Closed Bug 1407292 Opened 3 years ago Closed 3 years ago

./mach crashtest and reftest always fails on Mac (assert len(self._whitelistpaths) <= 2)


(Testing :: Reftest, defect)

Not set


(firefox58 fixed)

Tracking Status
firefox58 --- fixed


(Reporter: jorendorff, Assigned: Alex_Gaynor)




(1 file)

$ ./mach crashtest dom/base/crashtests/1406109-1.html 
Error running mach:

    ['crashtest', 'dom/base/crashtests/1406109-1.html']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error

The details of the failure are as follows:


  File "/Users/jorendorff/work/gecko/layout/tools/reftest/", line 223, in run_crashtest
    return self._run_reftest(**kwargs)
  File "/Users/jorendorff/work/gecko/layout/tools/reftest/", line 233, in _run_reftest
    return reftest.run_desktop_test(**kwargs)
  File "/Users/jorendorff/work/gecko/layout/tools/reftest/", line 91, in run_desktop_test
    rv = runreftest.run_test_harness(parser, args)
  File "/Users/jorendorff/work/gecko/layout/tools/reftest/", line 878, in run_test_harness
    result = reftest.runTests(options.tests, options)
  File "/Users/jorendorff/work/gecko/layout/tools/reftest/", line 518, in runTests
    return self.runSerialTests(manifests, options, cmdargs)
  File "/Users/jorendorff/work/gecko/layout/tools/reftest/", line 782, in runSerialTests
  File "/Users/jorendorff/work/gecko/layout/tools/reftest/", line 367, in createReftestProfile
    profile = mozprofile.Profile(**kwargs)
  File "/Users/jorendorff/work/gecko/testing/mozbase/mozprofile/mozprofile/", line 90, in __init__
  File "/Users/jorendorff/work/gecko/testing/mozbase/mozprofile/mozprofile/", line 120, in _internal_init
    assert len(self._whitelistpaths) <= 2


On my machine, whitelistpaths is: [

ReftestRunner.run_desktop_test puts the last two paths in that list:
        args.sandboxReadWhitelist.extend([self.topsrcdir, self.topobjdir])

RefTest.createReftestProfile adds the first path:
        sandbox_whitelist_paths = [SCRIPT_DIRECTORY] + options.sandboxReadWhitelist
I deleted the SCRIPT_DIRECTORY part (redundant in my case) and it worked for me.
Looks like bug 1392640 got regressed by bug 1403325.

The commit message there says "However, this only happens when running on Linux for some reason"... it might have been a good idea to look at the blame for the reason!
Blocks: 1403325
Severity: normal → blocker
Component: mach → Reftest
Flags: needinfo?(ahalberstadt)
Flags: needinfo?(agaynor)
Product: Core → Testing
Since SCRIPT_DIRECTORY should always be a subdirectory of srcdir, I don't think it should be needed on _any_ platform. So removing should leave this working on all platforms

:gcp, if memory serves, you originally wrote this code, does that sound right? Do you remember why we included SCRIPT_DIRECTORY?
Flags: needinfo?(agaynor)
Flags: needinfo?(gpascutto)
I don't really remember. Odds are that I was trying to find how to get at the needed paths, and SCRIPT_DIRECTORY was the easiest to find, so it went in first.
Flags: needinfo?(gpascutto)
Assignee: nobody → agaynor
Summary: ./mach crashtest always fails on Mac → ./mach crashtest and reftest always fails on Mac (assert len(self._whitelistpaths) <= 2)
Comment on attachment 8917122 [details]
Bug 1407292 - don't whitelist the script directory, it is duplicative of the srcdir;

::: layout/tools/reftest/
(Diff revision 1)
>          # Bug 1262954: For winXP + e10s disable acceleration
>          if platform.system() in ("Windows", "Microsoft") and \
>             '5.1' in platform.version() and options.e10s:
>              prefs['layers.acceleration.disabled'] = True
> -        sandbox_whitelist_paths = [SCRIPT_DIRECTORY] + options.sandboxReadWhitelist
> +        sandbox_whitelist_paths = options.sandboxReadWhitelist

There is no topsrcdir in CI, but your try run looks good so I guess we are already passing in the proper `--sandbox-read-whitelist` directories there.
Attachment #8917122 - Flags: review?(ahalberstadt) → review+
Flags: needinfo?(ahalberstadt)
Keywords: checkin-needed
Pushed by
don't whitelist the script directory, it is duplicative of the srcdir; r=ahal
Keywords: checkin-needed
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.