New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 678341 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

QuarantineUnittests fail on devices that don't support xattr (chromecast)

Project Member Reported by mbjorge@chromium.org, Jan 4 2017

Issue description

QuarantineTest.FileCanBeAnnotatedWithNoGUID and QuarantineTest.FileCanBeOpenedForReadAfterAnnotation are failing on Chromecast devices.

[ RUN      ] QuarantineTest.FileCanBeAnnotatedWithNoGUID
[11109:11109:1216/140652.174520:2241299249:ERROR:quarantine_linux.cc(33)] Could not set extended attribute user.xdg.origin.url on file /tmp/.org.chromium.Chromium.8NZPss/foo.class: Operation not supported
[11109:11109:1216/140652.174654:2241299378:ERROR:quarantine_linux.cc(33)] Could not set extended attribute user.xdg.referrer.url on file /tmp/.org.chromium.Chromium.8NZPss/foo.class: Operation not supported
../../content/common/quarantine/quarantine_unittest.cc:55: Failure
Value of: QuarantineFile(test_file, GURL(kInternetURL), GURL(kInternetReferrerURL), std::string())
  Actual: 4-byte object <03-00 00-00>
Expected: QuarantineFileResult::OK
Which is: 4-byte object <00-00 00-00>
[  FAILED  ] QuarantineTest.FileCanBeAnnotatedWithNoGUID (1 ms)

[ RUN      ] QuarantineTest.FileCanBeOpenedForReadAfterAnnotation
[11107:11107:1216/140651.650920:2240775649:ERROR:quarantine_linux.cc(33)] Could not set extended attribute user.xdg.origin.url on file /tmp/.org.chromium.Chromium.0IqmEt/foo.class: Operation not supported
[11107:11107:1216/140651.651054:2240775777:ERROR:quarantine_linux.cc(33)] Could not set extended attribute user.xdg.referrer.url on file /tmp/.org.chromium.Chromium.0IqmEt/foo.class: Operation not supported
../../content/common/quarantine/quarantine_unittest.cc:38: Failure
Value of: QuarantineFile(test_file, GURL(kInternetURL), GURL(kInternetReferrerURL), kTestGUID)
  Actual: 4-byte object <03-00 00-00>
Expected: QuarantineFileResult::OK
Which is: 4-byte object <00-00 00-00>
[  FAILED  ] QuarantineTest.FileCanBeOpenedForReadAfterAnnotation (1 ms)


The linux unittests guard the xattr tests with check that is_xattr_supported (https://cs.chromium.org/chromium/src/content/common/quarantine/quarantine_linux_unittest.cc?sq=package:chromium&rcl=1482150271&l=94)

Would it make sense to add a platform agnotistic IsQuarantineSupported() function in content/public/common/quarantine.h that can be defined per-platform and used by quarantine_unittests.cc to no-op on tests that xattr is supported on?

 
Cc: a...@chromium.org
Labels: -Pri-3 OS-Linux Pri-2
I guess also this means this functionality would be broken on Chromecast devices. Though I'm not sure if Chromecasts actually use this functionality, so it's probably not an issue in practice

Comment 2 by a...@chromium.org, Jan 6 2017

If we do this for tests, it should be called IsQuarantineSupportedForTesting(), because we wouldn't want to use that for regular code.
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6cfa618ab0a05e919b4f375409e9f27e76d21a87

commit 6cfa618ab0a05e919b4f375409e9f27e76d21a87
Author: mbjorge <mbjorge@chromium.org>
Date: Fri Jan 06 23:14:31 2017

[Chromecast] Disable Quarantine tests on chromecast.

BUG= 678341 

Review-Url: https://codereview.chromium.org/2618083002
Cr-Commit-Position: refs/heads/master@{#442089}

[modify] https://crrev.com/6cfa618ab0a05e919b4f375409e9f27e76d21a87/content/test/BUILD.gn

See also internal bug b/33702076
Status: Fixed (was: Untriaged)

Sign in to add a comment