summaryrefslogtreecommitdiff
path: root/runner
AgeCommit message (Collapse)Author
2020-01-16runner_tests: Test that dynamic subtest failure is handled correctlyPetri Latvala
See also: commit 0e6457f1bfe2 ("lib: Don't dump log buffer when dynamic subtest failure is inherited") This is quite an explicit top-to-bottom test that we don't get an incorrect warn result for an innocent dynamic subtest. It is tested here in runner_test instead of testing in lib/tests that the extra lines are not printed, because not printing the extra lines is an implementation detail that might change later. The issue is after all about test results parsed by igt_runner. v2: Squash adding the new mockup test binary to this commit Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-16runner_tests: Replace magic numbers with named constantsPetri Latvala
We have some handcrafted test binaries in runner/testdata/ for runner testing, and hardcoded numbers for the total amount of subtests and test binaries all over the runner's unit tests. Replace magic numbers with clear defines so new tests can easily be added. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-15runner/json_tests: Test handling of unprintable output from testsPetri Latvala
A simple test output with numbers from 1 to 255, both in plain text form and as a single byte with that particular value. Note that the json spec doesn't require \u-encoding for characters other than '"', '\' and the range U+0000 to U+001F, the raw non-\u-encoded UTF-8 in the reference.json file for bytes 128 and up is what libjson-c outputs for those codepoints and is valid. The validity of the json file can be verified with iconv, i.e. $ iconv -f UTF-8 reference.json -o /dev/null && echo it is utf-8 v2: Rebase over dynamic subtest tests, trivial Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-15runner: Ensure generated json is properly UTF8-encodedPetri Latvala
Sometimes tests output garbage (e.g. due to extreme occurrences of https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/55) but we need to present the garbage as results. We already ignore any test output after the first \0, and for the rest of the bytes that are not directly UTF-8 as-is, we can quite easily represent them with two-byte UTF-8 encoding. libjson-c already expects the string you feed it through json_object_new_string* functions to be UTF-8. v2: Rebase, adjust for dynamic subtest parsing Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-03runner/json_tests: Add test for parsing dynamic subtests with same namePetri Latvala
Multiple different subtests can have a dynamic subtest with the same name. Add a test to make sure we correctly delimit the output parsing. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-03runner/json_tests: Adapt to no longer reporting subtests with dynamic subtestsPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-03runner/resultgen: Don't report subtest result if it has dynamic subtestsPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-03runner/json_tests: Adapt to dynamic subtest result parsingPetri Latvala
Dynamic subtests now include more output, change the dynamic subtest parsing test accordingly. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-03runner/resultgen: Make subtest result line finding more robustPetri Latvala
On an assertion failure, the string "Subtest xyz failed" is printed. Make sure we don't match that for SUBTEST_RESULT, or the equivalent for dynamic subtests. Parsing the results already explicitly searched for the proper result line, the difference is when we delimit output up to "the next line of interest". Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-03runner/resultgen: Add support for extra validation hook in find_matches()Petri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-03runner/resultgen: Extrude dynamic subtest result textsPetri Latvala
The first dynamic part now starts its reported output at the beginning of its subtest's output, and the last dynamic part ends its reported output at the end of its subtest's output. v2: Rebase Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-03runner/resultgen: Hoist handling of dynamic subtest output to a helperPetri Latvala
v2: Rebase Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-03runner/resultgen: Extract finding begin/end pointers for test output to helpersPetri Latvala
v2: Rebase Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-03runner/resultgen: Extract finding begin/end lines for a subtest to a helperPetri Latvala
v2: Use an enum to select a pattern string for asprintf (Arek) Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2020-01-03runner/resultgen: Extract igt-version field handling to a helperPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-12-11runner/tests: Increase the timeout by 10xArkadiusz Hiler
The default timeout is 30s. Recently we see more `ninja test` invocation failing due to runner tests timing out. This happens for slower environments, i.e. running the cross-compiled binaries through qemu. Freedesktop CI/CD runners are shared machines with a lot of cores and they accept many parallel jobs coming from multiple projects. There are no resources guarantees, which leads to the sporadic slowness. Runner tests are taking 10x longer than the next slowest test invoked by `ninja test` on a typical run. They also seem more prone to resource thrashing by other processes on the machine, probably due to heavier reliance on disk IO. Let's just give them proportional leeway when it comes to timing out. Cc: Petri Latvala <petri.latvala@intel.com> Issue: https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/197 Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-12-05runner: Don't wait forever for processes to diePetri Latvala
While the originally written timeout for process killing (2 seconds) was way too short, waiting indefinitely is suboptimal as well. We're seeing cases where the test is stuck for possibly hours in uninterruptible sleep (IO). Wait a fairly longer selected time period of 2 minutes, because even making progress for that long means the machine is in bad enough state to require a good kicking and booting. v2: - Abort quicker if kernel is tainted (Chris) - Correctly convert process-exists check with kill() to process-does-not-exist Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-12-05runner: Actually ping watchdogs every intervalPetri Latvala
The split to timeout intervals was made to accomodate for watchdogs that cannot use a timeout as high as we wanted. Actually using that feature requires us to ping the watchdog every interval even though we handle actual timeouting after all intervals are used up. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-11-15runner/json_tests: Test dynamic subtestsPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-11-15runner: Parse dynamic subtest outputs and resultsPetri Latvala
If binary 'bin' has a subtest 'sub', which has dynamic subtests 'foo' and 'bar', results.json will now have "subtests" by the names igt@bin@sub@foo and igt@bin@sub@bar, with data as expected of normal subtests. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-10-21runner: Don't add timestamps when cannot exec a testPetri Latvala
Don't add timestamps when printing that we cannot execute a binary from a child (post fork-failed-execv). Timestamps were meant for runner's direct output only, and this was accidentally converted. v2: Rephrase commit message (Arek) Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-10-21runner/json_tests: Adapt to better output parsingPetri Latvala
Since we actually include the output before the subtest begins now, add it to the reference.jsons where applicable. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-10-21runner/resultgen: Refactor output parsingPetri Latvala
Instead of searching back and forth for proper lines, first find all lines that we could be interested in with one pass through the output, and use the positions of found lines to delimit the extracted outputs. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-10-21runner: Produce skip instead of notrun for nonexisting testsPetri Latvala
If a test was attempted but didn't actually exist, make it result in a skip instead of a notrun. This is to differentiate them from the tests that we didn't even attempt, like tests after getting a machine hang. This will improve handling of subtests for GEM engines that don't exist. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Acked-by: Martin Peres <martin.peres@linux.intel.com>
2019-10-14runner: Show kernel state on detecting test timeoutChris Wilson
When our watchdog expires and we declare the test has timed out, we send it a signal to terminate. The test will produce a backtrace upon receipt of that signal, but often times (especially as we do test and debug the kernel), the test is hung inside the kernel. So we need the kernel state to see where the live/deadlock is occuring. Enter sysrq-t to show the backtraces of all processes (as the one we are searching for may be sleeping). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com>
2019-10-14runner/resultgen: Handle empty outputsPetri Latvala
If an output (out.txt or err.txt) is completely empty, we handle the parsing just fine as is, but we end up assuming that if journal says we have a subtest, that subtest printed that it started. We have one case where out.txt was empty and all other files were intact (ran out of disk?) All other paths that expect certain texts handle failures finding them properly apart from subtest result processing, which happily passed along a NULL pointer as a string to json. After handling that case, the processing of said weird case proceeded fine and produced correct results. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-09-24runner: Chomp away trailing spaces from cmdlineChris Wilson
A minor refinement to remove the trailing spaces after converting the NUL-terminators to spaces. v2: Beware the crafty filename entirely composed of spaces. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-09-23runner: Show more elements of the signaler's argv[]Chris Wilson
/proc/$pid/cmdline is the entire argv[] including NUL-terminators. Replace the NULs with spaces so we get a better idea of who the signaler was, as often it is a subprocess (such as a child of sudo, or worse java). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-09-20runner: Add signal sender name when dyingChris Wilson
We want to know who sent us the fatal signal, for there are plenty of fingers to go around. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com>
2019-09-17runner: Add support for aborting on network failurePetri Latvala
If the network goes down while testing, CI tends to interpret that as the device being down, cutting its power after a while. This causes an incomplete to an innocent test, increasing noise in the results. A new flag to --abort-on-monitored-error, "ping", uses liboping to ping a host configured in .igtrc with one ping after each test execution and aborts the run if there is no reply in a hardcoded amount of time. v2: - Use a higher timeout - Allow hostname configuration from environment v3: - Use runner_c_args for holding c args for runner - Handle runner's meson options in runner/meson.build - Instead of one ping with 20 second timeout, ping with 1 second timeout for a duration of 20 seconds v4: - Rebase - Use now-exported igt_load_igtrc instead of copypaste code - Use define for timeout, clearer var name for single attempt timeout Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Cc: Daniel Vetter <daniel@ffwll.ch> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-09-13runner: Add a timestamp to each log messageChris Wilson
Very handy for correlating events between different logs. This generate igt_runner0.txt output like: [28.112360] Initializing watchdogs [28.112424] /dev/watchdog0 [28.114069] [001/269] (960s left) core_auth (basic-auth) Starting subtest: basic-auth Subtest basic-auth: SUCCESS (0.000s) [28.224898] [002/269] (960s left) debugfs_test (read_all_entries) Starting subtest: read_all_entries Subtest read_all_entries: SUCCESS (0.035s) The subtest logs are separate (not part of the runner's logging per-se), but the flow of events is clear enough from the runner's timestamp for now. v2: Concatenate split messages into a single call (so that the timestamp is only added once!) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-07-22runner: Make sure that we are closing watchdogs on signalsArkadiusz Hiler
There are few short windows of opportunity when watchdogs are primed but there is no signal handling in place, so the process may exit without proper shutdown sequence. This patch rearranges the existing code so that we set up the signalfd and BLOCK the signals before setting up watchdogs and UNBLOCK only after the watchdogs are closed properly. If igt_runner exits due to signal, non-zero status code is returned. v2: more error handling and minor touch ups (Simon) Cc: Petri Latvala <petri.latvala@intel.com> Cc: Simon Ser <simon.ser@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-07-22runner: Warn when watchdogs are being closed from the exit handlerArkadiusz Hiler
instead of being closed normally on a graceful code path Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-07-22runner: Make sure we don't close watchdogs twiceArkadiusz Hiler
Setting the watchdog fd lists to NULL for extra fireworks if accessed unintentionally. Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-07-16build: rename Meson optionsSimon Ser
Meson emits a warning because we use options beginning with "build_": DEPRECATION: Option uses prefix "build_", which is reserved for Meson. This will become an error in the future. Rename our options so that we don't use the Meson-reserved prefix. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-06-24runner/settings: Be consistent with empty blacklistArkadiusz Hiler
If provided an empty blacklist let's fail instead of returning a value of uninitialized variable. Cc: Oleg Vasilev <oleg.vasilev@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-06-24runner/resultgen: Don't pass NULL to str*() functionsArkadiusz Hiler
If we don't get values from the JSON strlen() and strcmp() on them would dereference NULL pointer. Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-06-24runner/executor: Make sure that intervals_left is always initializedArkadiusz Hiler
intervals_left got initialized only when when we had a timeout exceeding watchdog capabilities, meaning we had to use multiple shorter intervals by moving intervals_left = timeout_intervals down we are always initializing it Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-06-24runner: Log which signal was used to terminate the runnerArkadiusz Hiler
Feed the curious ones, aid the troubleshooters. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-06-24runner: Handle SIGHUP tooArkadiusz Hiler
Default handler for SIGHUP is also terminating the process, so let's mask it and handle it manually, like the rest of the bunch. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-06-24runner: Log when watchdog handling failsArkadiusz Hiler
If write or ioctl on a watchdog ever fails it will be logged. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-06-19runner: add --list-all and --blacklistOleg Vasilev
Currently, runner already collects all subtest names into job_list. --list-all allows to output it to stdout. --blacklist option takes a filename as an argument and adds all regexes from that file to the exclusion list. v2: - Update exclude/include regex matches for tests without subtests to be matched with pigtit-like name (Petri) - Replace relative paths with those formatted with testdatadir (Petri) - Minor codestyle changes v3: - Print test names in lowercase (Petri) v4: - Replaced custom str_to_lower with generate_piglit_name (Petri) - Minor codestyle changes Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Oleg Vasilev <oleg.vasilev@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-06-05runner_tests: Fix the file descriptor leakage subtestArkadiusz Hiler
Some libraries (looking at you, GnuTLS) may leave fds opened after the implicitly called library constructor. We don't have full control over them as they may be dependencies of our dependencies and may get pulled in if the user's and distribution's compile/configure/USE are just right. Let's close all the non-standard fds ahead of executing anything in the igt_runner tests, so we can test for descriptor leakage caused by any of the igt_runner code-paths exercised there. Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Simon Ser <simon.ser@intel.com>
2019-06-03runner: Cope with repeated subtests in journalPetri Latvala
As seen in fallout with the i915 engine discovery patchset, subtests can in very dire cases be entered multiple times, when the for loop they're in doesn't progress. That is of course a bug in IGT that needs to be fixed, but if (when) that happens again, don't make results take a million years to process. This patch has been tested to produce good results from the corresponding bad runs. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-05-23meson: Start using 'feature' optionsArkadiusz Hiler
Meson 0.47 comes with a new type of option called 'feature' so instead of: type : 'combo', value : 'auto', choices : ['auto', 'true', 'false'], We can: type : 'feature', The main difference is that the feature takes auto, enabled and disabled instead of auto, true and false. get_option() on a feature returns opaque object that can be passed as a 'required' argument of a dependency. Auto is equivalent to 'required : false', enabled is equivalent to 'required : true' and disabled introduces new behavior forcing the dependency to be considered not found. This allows us to streamline a lot of logic regarding optional IGT features. This patch bumps required meson version to 0.47.0 Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Simon Ser <simon.ser@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-05-10runner: Use glib's regex utilities instead of POSIX ERELyude Paul
POSIX ERE, while pretty standard is also very old and severely limited. In fact, it's so limited that Intel CI's own test blacklist, tests/intel-ci/blacklist.txt, doesn't even work with it due to the lack of support for backreferences. Since we're already using glib in other parts of igt, let's just start using glib's regular expression matching instead of the POSIX regex API. This gives us full perl compatible regular expressions and in turn, also gives us python compatible regular expressions to match piglit. Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Lyude Paul <lyude@redhat.com>
2019-05-10runner: Disable building if tests are not builtPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110248 Cc: Eero Tamminen <eero.t.tamminen@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-05-10runner_tests: Operate within defined behaviorArkadiusz Hiler
Quoting lib/igt_core.c: * - Code blocks with magic control flow are implemented with setjmp() and * longjmp(). This applies to #igt_fixture and #igt_subtest blocks and all the * three variants to finish test: igt_success(), igt_skip() and igt_fail(). * Mostly this is of no concern, except when such a control block changes * stack variables defined in the same function as the control block resides. * Any store/load behaviour after a longjmp() is ill-defined for these * variables. Avoid such code. * * Quoting the man page for longjmp(): * * "The values of automatic variables are unspecified after a call to * longjmp() if they meet all the following criteria:" * - "they are local to the function that made the corresponding setjmp() call; * - "their values are changed between the calls to setjmp() and longjmp(); and * - "they are not declared as volatile." We have quite a few igt_subtest_group that define local variables to share the state between subtest and fixture (e.g. set open() in subtest, close() in the following fixture), causing the contents to be undefined. We can allocate some of them using malloc and make the others volatile to be back on the defined grounds. Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-16runner/job_list: print error when job list is emptySimon Ser
Using a filter that doesn't match any test name resulted in the runner silently failing. Print an error message so that the user understands why the runner fails. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-04-12runner: Make sure oom-killer doesn't kill the runnerPetri Latvala
Tests that eat all of the RAM and then some to invoke the oom-killer deliberately sometimes cause extra casualties. Make sure the runner stays alive. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>