Граф коммитов

3121 Коммитов

Автор SHA1 Сообщение Дата
Alex Gaynor b08206238c Bug 1374557 - Part 2 - Use the new preference to whitelist paths for reading that are needed by tests; r=gcp,haik,jmaher
MozReview-Commit-ID: 4IaTrHPHZaC

--HG--
extra : rebase_source : 28824735f74b369d5755b3bced0f61d22c7c8845
2017-06-21 10:24:16 -04:00
Sebastian Hengst c709e5f990 Backed out changeset 6b8840096867 (bug 1372263) 2017-07-01 00:33:10 +02:00
Sebastian Hengst b0f5713347 Backed out changeset 7dcc7dac37d1 (bug 1372263) 2017-07-01 00:33:05 +02:00
Andrew Halberstadt e31175ba5d Bug 1372263 - Add additional mochitest selftests for crashes, assertions and leaks, r=jmaher
This also starts running the selftests on linux debug builds, since that's the only place that we
can test assertions and leaks.

MozReview-Commit-ID: JTdTLOLWn5r

--HG--
extra : rebase_source : 643f8d15a550fa39f4d3daba75c60560deefc96e
2017-06-22 16:37:11 -04:00
Andrew Halberstadt 51f70044ef Bug 1372263 - Add ability to skip mochitest selftests based on mozinfo properties, r=jmaher
MozReview-Commit-ID: JTdTLOLWn5r

--HG--
extra : rebase_source : 88da98f77a04891a470d831e837bbeb8a8262a32
2017-06-22 16:36:15 -04:00
Christian Holler b8ee76ebd8 Bug 1373256 - Changes to support -fsanitize=integer in the codebase. r=froydnj
The -fsanitize=integer analysis from UBSan can be helpful to detect signed and unsigned integer overflows in the codebase. Unfortunately, those occur very frequently, making it impossible to test anything with it without the use of a huge blacklist. This patch includes a blacklist that is broad enough to silence everything that would drain performance too much. But even with this blacklist, neither tests nor fuzzing is "clean". We can however in the future combine this with static analysis to limit ourselves to interesting places to look at, or improve the dynamic analysis to omit typical benign overflows.

It also adds another attribute that can be used on functions. It is not used right now because it was initially easier to add things to the compile-time blacklist to get started.

Finally, it includes a runtime suppression list and patches various parts in the test harnesses to support that. It is currently empty and it should not be used on frequent overflows because it is expensive. However, it has the advantage that it can be used to differentiate between signed and unsigned overflows while the compile-time blacklist cannot do that. So it can be used to e.g. silence unsigned integer overflows on a file or function while still reporting signed issues. We can also use this suppression list for any other UBSan related suppressions, should we ever want to use other features from that sanitizer.

MozReview-Commit-ID: C5ofhfJdpCS

--HG--
extra : rebase_source : 952043a441b41b2f58ec4abc51ac15fa71fc142f
2017-04-09 12:59:26 +02:00
Carsten "Tomcat" Book 5f00ae3a8b merge mozilla-inbound to mozilla-central a=merge 2017-06-29 15:47:04 +02:00
Paolo Amadini 06de7cf6bf Bug 1374242 - Remove obsolete whitelisting of unhandled rejections. r=Mossop
The whitelisting function thisTestLeaksUncaughtRejectionsAndShouldBeFixed was replaced by expectUncaughtRejection, and existing calls did not take effect anymore.

MozReview-Commit-ID: 3uOxkgWYWEz

--HG--
extra : rebase_source : 6b27b77da78743880529adae7adf4ec2aa64dfea
extra : intermediate-source : 5809a30a0c4817509beb1078cf336d8367b8107a
extra : source : 6f0394b523a66dab444b8551deb8f3c6c81d8f31
2017-06-29 00:13:06 +01:00
Paolo Amadini be3f9ed657 Bug 1374241 - Add self-tests for unhandled rejection handling in browser-chrome tests. r=Mossop
MozReview-Commit-ID: 9gloXfhfZ3x

--HG--
rename : testing/mochitest/tests/browser/browser_fail_add_task.js => testing/mochitest/tests/browser/browser_fail_add_task_uncaught_rejection.js
extra : rebase_source : e4ce3389715d144711f23d10e2779ccd7fece134
extra : intermediate-source : 971751d97bb4c13a565f35db82cd411d68fa36e7
extra : source : c9c01c06908add6e1631121bed3d0cfaa8feeefa
2017-06-29 00:12:58 +01:00
Andrew Halberstadt 95c0561603 Bug 1372567 - Fix problems with mochitest structured logging, r=jgraham
The mochitest harness uses testEnd multiple times to log various failures. This can result
in several testEnd messages, which will soon cause mozlog to spit out an error. Instead,
these should be testStatus.

This also starts using mozlog's assertion_count log action to log test assertions (again,
instead of testEnd).

MozReview-Commit-ID: FFsyicSso5Y

--HG--
extra : rebase_source : 5e8d02714fcf24f2b86a9867b0403bbda0d00f91
2017-06-21 08:40:19 -04:00
Geoff Brown 14713f207c Bug 1365636 - Wait for geckoview crash directory to be created; r=jmaher 2017-06-28 16:58:24 -06:00
Geoff Brown 39b260e512 Bug 1365636 - Cause geckoview job to fail when no crash directory found; r=jmaher
"Automation Error" is not sufficient to turn a mozharness job orange.
mochitest-plain failures of this type normally cause job failure by not
printing out the test suite summary. This patch uses the same technique
for geckoview tests: If a crash is detected, do not print a test summary,
so that mozharness will subsequently fail the job.
2017-06-28 16:58:22 -06:00
Carsten "Tomcat" Book d8e080c10c Backed out changeset 07e0c4e4ae85 (bug 1373256) for breaking android tests 2017-06-28 14:47:55 +02:00
Christian Holler 9924ab3046 Bug 1373256 - Changes to support -fsanitize=integer in the codebase. r=froydnj
The -fsanitize=integer analysis from UBSan can be helpful to detect signed and unsigned integer overflows in the codebase. Unfortunately, those occur very frequently, making it impossible to test anything with it without the use of a huge blacklist. This patch includes a blacklist that is broad enough to silence everything that would drain performance too much. But even with this blacklist, neither tests nor fuzzing is "clean". We can however in the future combine this with static analysis to limit ourselves to interesting places to look at, or improve the dynamic analysis to omit typical benign overflows.

It also adds another attribute that can be used on functions. It is not used right now because it was initially easier to add things to the compile-time blacklist to get started.

Finally, it includes a runtime suppression list and patches various parts in the test harnesses to support that. It is currently empty and it should not be used on frequent overflows because it is expensive. However, it has the advantage that it can be used to differentiate between signed and unsigned overflows while the compile-time blacklist cannot do that. So it can be used to e.g. silence unsigned integer overflows on a file or function while still reporting signed issues. We can also use this suppression list for any other UBSan related suppressions, should we ever want to use other features from that sanitizer.

MozReview-Commit-ID: C5ofhfJdpCS

--HG--
extra : rebase_source : 64aa804965d24bb90b103c00c692a2ac6859e408
2017-04-09 12:59:26 +02:00
Johann Hofmann 0c2ea0509c Bug 1364896 - Part 3 - Add a test for contextmenu touchmode. r=dao,jmaher
This also adds a utility function for synthesizing native touch
events to Eventutils.js.

I did not add a test for searchbar because of intermittent issues
with showing the contextmenu (that are not reproducible manually).
I believe this is rather related to searchbar functionality than
my patches.

MozReview-Commit-ID: Dqm92Saosxz

--HG--
extra : rebase_source : e59df4f487f60cea137fbf8aea71a854a5706de9
2017-06-23 11:48:35 +02:00
Ryan VanderMeulen 309d4a291b Backed out 3 changesets (bug 1364896) for causing bug 1376466.
Backed out changeset 5c870a786e94 (bug 1364896)
Backed out changeset 134d9ee1e545 (bug 1364896)
Backed out changeset 8f52f28a9eaa (bug 1364896)
2017-06-27 14:32:07 -04:00
Johann Hofmann acba8482a8 Bug 1364896 - Part 3 - Add a test for contextmenu touchmode. r=dao,jmaher
This also adds a utility function for synthesizing native touch
events to Eventutils.js.

I did not add a test for searchbar because of intermittent issues
with showing the contextmenu (that are not reproducible manually).
I believe this is rather related to searchbar functionality than
my patches.

MozReview-Commit-ID: Dqm92Saosxz

--HG--
extra : rebase_source : d5c4333609b68773e62447bd3158cadfa89b803b
2017-06-23 11:48:35 +02:00
Tooru Fujisawa 4735d8aaac Bug 1375938 - Fix documentation comment about synthesizeNativeOSXClick. r=smaug DONTBUILD 2017-06-25 23:57:56 +09:00
Marco Bonardo a60ccaff04 Bug 1263378 - Intermittent leaks from browser_bug461710.js. r=standard8
MozReview-Commit-ID: FQQkGaiE0xZ

--HG--
extra : rebase_source : 5cdb8a0de4cdc5afd923ab596f9c01ebf344bc9f
2017-06-21 13:30:13 +02:00
Andrew McCreight 31e39883db Bug 1375262 - Add the ability to pass sandbox options to SpecialPowers.loadChromeScript(). r=jmaher
SpecialPowers.loadChromeScript() sends a script to the child process,
then creates a sandbox, and runs the script in that sandbox. There are
various sandboxOptions that can be passed when creating a sandbox, and
it would be nice to have that functionality for loadChromeScript.

I just need this for wantGlobalProperties, but I might as well make it
as general as possible. I'm not sure all of the types it can take can
actually be serialized across processes, but I guess that's okay.

MozReview-Commit-ID: GoJjXdjizFk

--HG--
extra : rebase_source : 9c2bc190dbf5a080978953cffd64205e8b816367
2017-06-20 15:50:20 -07:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Edgar Chen 7b429345fd Bug 1236512 - Part 3: Set docShellIsActive to false when browser window is fully covered by another application; r=mconley
MozReview-Commit-ID: DLsmWp1h8pa
2017-06-05 14:56:00 +08:00
Alex Gaynor 6f7e5916ce Bug 1374718 - removed strictContentSandbox mochitest option; r=bobowen
For a while now it has been making the content process sandbox less strict.

MozReview-Commit-ID: Am6fGzViaLk

--HG--
extra : rebase_source : 0bc037f205896c866559a7ab1f7e2c042c3142db
2017-06-20 13:30:45 -04:00
Paolo Amadini 585fbe6cec Bug 1242505 - Detect unhandled rejections of native Promises in browser-chrome tests. r=Mossop
The browser-chrome test suite now detects and reports unhandled rejections of native Promises, in addition to those created by Promise.jsm. The whitelisting mechanism is updated to use primarily the PromiseTestUtils.expectUncaughtRejection function. Tests will fail if a rejection that is not whitelisted occurs, or if a whitelisted rejection does not occur anymore.

MozReview-Commit-ID: 1beGB5GG8Ty

--HG--
extra : rebase_source : b6573f8e2001f91d0e5a50f6376b191459549e94
extra : intermediate-source : 0411e687044ecc7b56684196238e6e6e68a9d685
extra : source : 8d53be05afc59519c5ce8cfae96d284a972fda71
2017-06-18 08:05:06 +01:00
Andrew Halberstadt c9beaa56b4 Bug 1373294 - Fix E305 (two blank lines after method or class) in files enabled by flake8 linter, r=jmaher
This is needed before we can upgrade to flake8 3.3.0, as that version starts flagging these errors.

These files were modified by running:
autopep8 --select E305 --in-place -r <dir>

on the affected directories. I did it one dir at a time and verified the result after each.

MozReview-Commit-ID: FmlsfiKIbtr

--HG--
extra : rebase_source : 9df32258cadff5d27a0e72113c57f782756c0b18
2017-06-15 12:10:59 -04:00
Mark Banner 3e55f32f5b Bug 1372738 - A test timing out may show false uncaught errors in subsequent tests. r=mossop
MozReview-Commit-ID: 3HMWssBcwqX

--HG--
extra : rebase_source : 2ba5b05e127d495c0d12900c4a12dba75ad32c33
2017-06-13 22:55:44 +01:00
Andrew Halberstadt 8177e735f3 Bug 1048446 - [python-test] Create a mochitest selftest harness, r=jmaher
This will create a mochitest selftest harness based on |mach python-test|. There
is also a basic test that checks whether TEST-PASS and TEST-UNEXPECTED-FAIL work.

MozReview-Commit-ID: Jqyhbj7nC6z

--HG--
extra : rebase_source : d73b37305590a415e350ee45785a85635e7d4209
2017-05-31 13:52:01 -04:00
Andrew Halberstadt 08935b6d52 Bug 1048446 - [mochitest] Check for a modules dir in the parent directory even if there is a build, r=gbrown
MozReview-Commit-ID: Jqyhbj7nC6z

--HG--
extra : rebase_source : 6fcc43388185d6dcaa313f2da4808521fe998653
2017-05-29 14:29:43 -04:00
Andrew Halberstadt c7ebd24d8e Bug 1048446 - [mozlog] Don't re-use existing loggers when calling mozlog.commandline.setup_logging a second time, r=jgraham
This is case that got hit with the new mochitest selftest harness. In this scenario, several MochitestDesktop instances
(which call commandline.setup_logging in their constructor) are instantiated in the same interpreter. Because mozlog
implicitly saves the logger state, this meant that setup_logging kept appending duplicate handlers to the existing ones.

I believe that the intent of 'setup_logging' is to get a brand new logger, so it should ensure logger state is reset
on subsequent calls.

MozReview-Commit-ID: Jqyhbj7nC6z

--HG--
extra : rebase_source : f267489bef99f3ac3d657357002a0001610a038f
2017-05-29 14:23:04 -04:00
Andrew Halberstadt 12cc7edad9 Bug 1370359 - Add ally to list of test path prefixes that mochitest harness normalizes, r=jgraham
MozReview-Commit-ID: UFu9JwHxRj

--HG--
extra : rebase_source : daded2698973aa6a14b8d7ea633345ac067e32be
2017-06-07 14:42:41 -04:00
Joel Maher b44356bc28 Bug 1368364 - backout bug 1242505 as it causes browser/modules/ intermittent failures. r=paolo 2017-06-03 10:34:14 +02:00
Alex Gaynor 61cc4acf59 Bug 1363760 - Part 3 - In tests, install SpecialPowers and mochijar as non-temporary addons r=ahal
This means they will be copied to $PROFILE/extensions, which the sandbox allows
access to; if they are installed as temporary addons, loading frame scripts in
the content process tries to read from wherever they happen to be on disk. This
breaks running tests with a packaged build once we have full read-restrictions
for the content process sandbox.

MozReview-Commit-ID: 7ZiiM9FMXfG

--HG--
extra : rebase_source : d2cf3a2d06df9099dc6056fae351200eaa1d0ca9
2017-05-30 10:09:57 -04:00
Geoff Brown e8d6ec9627 Bug 1367780 - Additional changes for eslint on testing/firefox-ui,mozbase,profiles,specialpowers; r=Standard8 2017-05-30 16:06:31 -06:00
Paolo Amadini 30ea634bb0 Bug 1242505 - Part 5 - Remove obsolete whitelisting of unhandled rejections. r=Mossop
The whitelisting function thisTestLeaksUncaughtRejectionsAndShouldBeFixed was replaced by expectUncaughtRejection, and existing calls did not take effect anymore.

MozReview-Commit-ID: 3uOxkgWYWEz

--HG--
extra : rebase_source : 5a10a3ebbfe0ce2a801330041f95447c313a9a70
extra : source : 6f0394b523a66dab444b8551deb8f3c6c81d8f31
2017-05-25 15:00:49 +01:00
Paolo Amadini f960ce1e88 Bug 1242505 - Part 4 - Add self-tests for unhandled rejection handling in browser-chrome tests. r=Mossop
MozReview-Commit-ID: 9gloXfhfZ3x

--HG--
rename : testing/mochitest/tests/browser/browser_fail_add_task.js => testing/mochitest/tests/browser/browser_fail_add_task_uncaught_rejection.js
extra : rebase_source : 7e03f6112ec15c4e85235e590f76ee2321d68cfd
extra : source : c9c01c06908add6e1631121bed3d0cfaa8feeefa
2017-05-27 09:15:19 +01:00
Paolo Amadini d7513d1e02 Bug 1242505 - Part 3 - Detect unhandled rejections of native Promises in browser-chrome tests. r=Mossop
The browser-chrome test suite now detects and reports unhandled rejections of native Promises, in addition to those created by Promise.jsm. The whitelisting mechanism is updated to use primarily the PromiseTestUtils.expectUncaughtRejection function. Tests will fail if a rejection that is not whitelisted occurs, or if a whitelisted rejection does not occur anymore.

MozReview-Commit-ID: 1beGB5GG8Ty

--HG--
extra : rebase_source : 64395c5fdf25deebd60dfbf2cf5df3cbf7ca8abb
extra : amend_source : 0a3f13419c050662680f2bd110d724b3bf991732
extra : source : 8d53be05afc59519c5ce8cfae96d284a972fda71
2017-05-28 11:46:45 +01:00
Paolo Amadini a002e5d1d1 Bug 1365649 - Improve browser-chrome self-tests and the "fail-if" manifest property handling. r=Mossop
The browser-chrome self-test files now use the setExpectedFailuresForSelfTest function to specify the exact number of assertion failures that will be triggered. Also, most failures are now intercepted when specifying the "fail-if" property in a "browser.ini" manifest, while previously only those triggered using the "ok" function were intercepted. This allows re-enabling several browser-chome self-tests.

MozReview-Commit-ID: DlDjWaJPfvH

--HG--
extra : rebase_source : d9977dac6ecbd2b28f5697d22ce6edf4e1d4f899
extra : source : 6da58c7bb247d3e879012bea8d848eb68f16e36e
2017-05-27 09:12:02 +01:00
Sebastian Hengst 2748dd52d2 Backed out changeset 6da58c7bb247 (bug 1365649) for frequently failing devtools/client/netmonitor/test/browser_net_simple-request-data.js. r=backout 2017-05-28 11:32:16 +02:00
Sebastian Hengst 8d47870cdc Backed out changeset 8d53be05afc5 (bug 1242505) 2017-05-28 11:31:12 +02:00
Sebastian Hengst 2aea17aeb6 Backed out changeset c9c01c06908a (bug 1242505) 2017-05-28 11:31:06 +02:00
Sebastian Hengst ea55cd0be2 Backed out changeset 6f0394b523a6 (bug 1242505) 2017-05-28 11:31:01 +02:00
Paolo Amadini 94c629ed8c Bug 1242505 - Part 5 - Remove obsolete whitelisting of unhandled rejections. r=Mossop
The whitelisting function thisTestLeaksUncaughtRejectionsAndShouldBeFixed was replaced by expectUncaughtRejection, and existing calls did not take effect anymore.

MozReview-Commit-ID: 3uOxkgWYWEz

--HG--
extra : rebase_source : 3a7720091180a770b32b595f8094c0d20170166d
2017-05-25 15:00:49 +01:00
Paolo Amadini 71878bc0cf Bug 1242505 - Part 4 - Add self-tests for unhandled rejection handling in browser-chrome tests. r=Mossop
MozReview-Commit-ID: 9gloXfhfZ3x

--HG--
rename : testing/mochitest/tests/browser/browser_fail_add_task.js => testing/mochitest/tests/browser/browser_fail_add_task_uncaught_rejection.js
extra : rebase_source : 31e3a52cb783a656119253e6a380260883bb0de3
2017-05-27 09:15:19 +01:00
Paolo Amadini 8edd3b1d5c Bug 1242505 - Part 3 - Detect unhandled rejections of native Promises in browser-chrome tests. r=Mossop
The browser-chrome test suite now detects and reports unhandled rejections of native Promises, in addition to those created by Promise.jsm. The whitelisting mechanism is updated to use primarily the PromiseTestUtils.expectUncaughtRejection function. Tests will fail if a rejection that is not whitelisted occurs, or if a whitelisted rejection does not occur anymore.

MozReview-Commit-ID: 1beGB5GG8Ty

--HG--
extra : rebase_source : 59e5b84cb431f3ca28287d30a3da8fbea1363ec5
2017-05-25 15:00:35 +01:00
Paolo Amadini 07056b1bad Bug 1365649 - Improve browser-chrome self-tests and the "fail-if" manifest property handling. r=Mossop
The browser-chrome self-test files now use the setExpectedFailuresForSelfTest function to specify the exact number of assertion failures that will be triggered. Also, most failures are now intercepted when specifying the "fail-if" property in a "browser.ini" manifest, while previously only those triggered using the "ok" function were intercepted. This allows re-enabling several browser-chome self-tests.

MozReview-Commit-ID: DlDjWaJPfvH

--HG--
extra : rebase_source : 498914c84ab69dd484fb5487ad9967073c331fd3
2017-05-27 09:12:02 +01:00
Ryan VanderMeulen 8543438674 Merge inbound to m-c. a=merge 2017-05-25 16:34:16 -04:00
Geoff Brown 3054ba2e79 Bug 1366129 - Improve cleanup of android mochitest environment before starting tests; r=jmaher 2017-05-25 07:32:46 -06:00
J. Ryan Stinnett e9136d19a5 Bug 1328509 - Check failure patterns in assertSnapshots. r=xidorn
Several mochitests call `assertSnapshots`, which prints a reftest-like output
for use with the reftest analyzer.  Update these lines to check failure patterns
before printing, like the regular assertion methods do.

MozReview-Commit-ID: CfChoar7bp8
2017-05-25 10:13:25 -05:00
Phil Ringnalda 30a91cb819 Backed out 6 changesets (bug 1328509) for Windows 7 failures in test_visited_reftests.html
Backed out changeset 8388d8c76fed (bug 1328509)
Backed out changeset 182a88607e08 (bug 1328509)
Backed out changeset 008efac7764b (bug 1328509)
Backed out changeset c2ce10b8bc37 (bug 1328509)
Backed out changeset 65bbc73c87aa (bug 1328509)
Backed out changeset e20d3d5170c2 (bug 1328509)

MozReview-Commit-ID: BSmqdFP1Zom
2017-05-24 22:12:53 -07:00
J. Ryan Stinnett 3d8b73c8cf Bug 1328509 - Check failure patterns in assertSnapshots. r=xidorn
Several mochitests call `assertSnapshots`, which prints a reftest-like output
for use with the reftest analyzer.  Update these lines to check failure patterns
before printing, like the regular assertion methods do.

MozReview-Commit-ID: CfChoar7bp8
2017-05-24 21:20:07 -05:00