mozalloc_abort and related abort functions are the top frame for many
different, unrelated crashes because they happen to be the standard way to
abort execution. That makes it difficult to properly classify and deal with
intermittent failures.
This patch changes our crash handling behavior so that we try to skip any
frames at the top of the stack that are in generic abort functions, and use
the topmost frame which is actually relevant to the crash reason instead.
Differential Revision: https://phabricator.services.mozilla.com/D33051
--HG--
extra : moz-landing-system : lando
Windows documentation indicates that it's invalid to WaitForSingleObject
on a process handle unless you request the SYNCHRONIZE access right.
And indeed, we see errors in the logs like:
09:58:28 WARNING - mozcrash kill_pid(): wait failed (-1) terminating pid 6340: error 5
That "error 5" is an ERROR_ACCESS_DENIED code. Such errors should go
away with requesting the proper access rights. Credit to dmajor for
noticing the discrepancy.
The following python-test paths are being moved out of 'make check' and into their own task:
- python/mozlint
- testing/mozbase
- tools/lint
The following python-test paths previously did not run on Windows:
- python/mozterm
- testing/marionette
- testing/raptor
- tools/tryselect
Differential Revision: https://phabricator.services.mozilla.com/D10759
--HG--
extra : moz-landing-system : lando
The following python-test paths are being moved out of 'make check' and into their own task:
- python/mozlint
- testing/mozbase
- tools/lint
The following python-test paths previously did not run on Windows:
- python/mozterm
- testing/marionette
- testing/raptor
- tools/tryselect
MozReview-Commit-ID: C07FANaYzf7
Depends on D10758
Differential Revision: https://phabricator.services.mozilla.com/D10759
--HG--
extra : moz-landing-system : lando
The build job on Windows sets the MINIDUMP_SAVE_PATH env variable,
and because it isn't unset mozcrash copies all created minidump
files from unittests to the "public/build" folder, which then
get uploaded as artifacts.
MozReview-Commit-ID: 6JNnRZGlOj3
--HG--
extra : rebase_source : a139221b810e1b38082d5676b67583269802b7e9
The build job on Windows sets the MINIDUMP_SAVE_PATH env variable,
and because it isn't unset mozcrash copies all created minidump
files from unittests to the "public/build" folder, which then
get uploaded as artifacts.
MozReview-Commit-ID: 6JNnRZGlOj3
--HG--
extra : rebase_source : c148e5a8ac4439ca0f4e66ee649b45ceb7b1bc60
To let mozcrash handle minidump files located in profile paths
with unicode characters, support for that has to be added. It
also applies to the locations for the stackwalk binary, minidump
save path, and symbols.
MozReview-Commit-ID: EROVmK21a5Y
--HG--
extra : rebase_source : 67092e6164eb0e46decd24b2da1490ffefb4d5d7
Switch to the pytest framework to benefit from its rich
feature set for creating Python test.
MozReview-Commit-ID: AoptjhT1Hln
--HG--
extra : rebase_source : a0870e54038697f08cf14e7babffdb014a7a3c7d
Right now if no minidump file is present in the minidump folder,
the check_for_crashes method returns False. Whereby in all other
cases the number of crashes is returned.
To be consistent this method should always return a number, and
in case of no minidumps it should be 0.
MozReview-Commit-ID: 3DTgxn41TVn
--HG--
extra : rebase_source : 1631313878b596607ede27ebb04f95a64e2f9e2e
Split single unit test module into different modules separated
by area of test coverage.
MozReview-Commit-ID: Blh8V46kDq1
--HG--
extra : rebase_source : 64bfa620286904fdb2bde114efb337d0dd5d42b7
This is a new issue that gets linted with flake8 3.5.0. Basically you should
never use a blank except: statement.
This will catch all exceptions, including KeyboardInterrupt and SystemExit
(which is likely not intended). If a catch all is needed, use
`except: Exception`. If you *really* mean to also catch KeyboardInterrupt et
al, use `except: BaseException`.
Of course, being specific is often better than a catch all.
MozReview-Commit-ID: FKx80MLO4RN
--HG--
extra : rebase_source : 7c74a7d0d81f2c984b47aff3a0ee3448b791177b
This switches most tests over to use pytest as the runner instead of unittest (taking
advantage of the fact that pytest can run unittest based tests).
There were a couple tests that had failures when swithing to pytest:
config/tests/unit-expandlibs.py
xpcom/idl-parser/xpidl/runtests.py
For these tests, I added a runwith='unittest' argument so that they still run the
same way as before. Once we fix them to use pytest, the unittest logic in mozunit.py
can be deleted.
MozReview-Commit-ID: Gcsz6z8MeOi
--HG--
extra : rebase_source : 3c762422ce0af54cbbe7d9fc20085a2d1ebe7057
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
The subsuite is added conditionally because we only have the capability of
running source-check tasks on linux at the moment. Once taskcluster support
for windows and mac has matured a bit and the taskcluster configs support
source-check there, we should apply the subuite unconditionally.
MozReview-Commit-ID: Kk9Irz3fn14
--HG--
extra : rebase_source : b9266a06583083c36477d4e93f5462ee614cdb71
The mozbase unittests don't use mozunit, so their output is confusing in the log.
This makes mozbase output consistent with the rest of the python unittests.
MozReview-Commit-ID: AIs5mza8Rn6
--HG--
extra : rebase_source : 10f65e612f5b3cebb921c47699f5a8be7cd2ba5a
Currently check_for_crashes() behaves differently compared to log_crashes(), whereby it only returns a
boolean if a crash has been detected but not the amount of crash reports found. We should make sure that
both methods behave the same. Given that this change might affect consumers, we should have a major version
bump for the new release.
MozReview-Commit-ID: LiPaozJL5NF
--HG--
extra : rebase_source : d4392207399a1383a20e037bcf73f44bf3c36c7d
added testing/mozbase to tools/lint/flake8.lint
fixed a first batch of PEP8 errors/warnings
at first the commad autopep8 -i --max-line-length 99 -r -j 8 .
has been used to fix simpler problems, run from testing/mozbase
some of the issues can not easily fixed :
- undefined 'names' in code for example isLinux - isLinux and isBsd "fixed" with # noqa
- undefined 'message' resolved with return fmt.format(...
- undefined 'structured' resolved replacing those with mozlog
- long comments - some remaining - addressed with # noqa
- package level import everything - addressed with # flake8: noqa
restored testing/mozbase/mozdevice/mozdevice/Zeroconf.py
fixed issues reported on mozreview
fixed ')' in testing/mozbase/mozprocess/mozprocess/qijo.py imports
finally fixed multiline string at testing/mozbase/manifestparser/tests/test_manifestparser.py:114
^^^ and again, but now with ./mach python-test --path-only testing/mozbase/manifestparser/tests/test_manifestparser.py passing
fixed testing/mozbase/manifestparser/tests/test_convert_directory.py assert
fixed this error:
10:15:21 INFO - return lambda line: stack_fixer_module.fixSymbols(line)
10:15:21 INFO - TypeError: fixSymbols() takes exactly 2 arguments (1 given)
fixed two spaces lint error even of # noqa comments
restored assignement to lambda with # noqa to silence the lint error
global noqa for testing/mozbase/manifestparser/tests/test_filters.py
stupid is/is not error...
MozReview-Commit-ID: 1FpJF54GqIi
--HG--
extra : rebase_source : 3cf0277fb36a296e3506aeacc2ff05e1b03f9eac