Age | Commit message (Collapse) | Author |
|
Support executing external processes with the goal of capturing its
standard streams to the igt logging infrastructure in addition to its
exit status.
v3: Rename igt_exec -> igt_system (Chris).
v2: Fix leaks on fd teardown. Make sure redirected process printout when
> 64kb still works, like full dmesg. (Petri).
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Tool which emits batch buffers to engines with configurable
sequences, durations, contexts, dependencies and userspace waits.
Unfinished but shows promise so sending out for early feedback.
v2:
* Load workload descriptors from files. (also -w)
* Help text.
* Calibration control if needed. (-t)
* NORELOC | LUT to eb flags.
* Added sample workload to wsim/workload1.
v3:
* Multiple parallel different workloads (-w -w ...).
* Multi-context workloads.
* Variable (random) batch length.
* Load balancing (round robin and queue depth estimation).
* Workloads delays and explicit sync steps.
* Workload frequency (period) control.
v4:
* Fixed queue-depth estimation by creating separate batches
per engine when qd load balancing is on.
* Dropped separate -s cmd line option. It can turn itself on
automatically when needed.
* Keep a single status page and lie about the write hazard
as suggested by Chris.
* Use batch_start_offset for controlling the batch duration.
(Chris)
* Set status page object cache level. (Chris)
* Moved workload description to a README.
* Tidied example workloads.
* Some other cleanups and refactorings.
v5:
* Master and background workloads (-W / -w).
* Single batch per step is enough even when balancing. (Chris)
* Use hars_petruska_f54_1_random IGT functions and see to zero
at start. (Chris)
* Use WC cache domain when WC mapping. (Chris)
* Keep seqnos 64-bytes apart in the status page. (Chris)
* Add workload throttling and queue-depth throttling commands.
(Chris)
v6:
* Added two more workloads.
* Merged RT balancer from Chris.
v7:
* Merged NO_RELOC patch from Chris.
* Added missing RT balancer to help text.
TODO list:
* Fence support.
* Batch buffer caching (re-use pool).
* Better error handling.
* Less 1980's workload parsing.
* More workloads.
* Threads?
* ... ?
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "Rogozhkin, Dmitry V" <dmitry.v.rogozhkin@intel.com>
|
|
The fbcon imposes unpredictable latencies on tests - each drmIoctl has
been observed to trigger two 650us calls to console_unlock() as it
flushes printk buffer for the DRM_DEBUG around the ioctl. This makes
tests such as gem_wait fail as they expect the ioctl to be spent on the
operation under test not clogged up by the console.
References: https://bugs.freedesktop.org/show_bug.cgi?id=99130
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
A few warnings of the form:
gem_mmap_gtt.c: In function ‘copy_wc_page’:
gem_mmap_gtt.c:480:16: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
__m128i *S = (const __m128i *)src;
are no more.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Lots of test cases are re-declaring this.
v2: Remove definition in benchmarks/gem_syslatency.c
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
|
|
Make the IGT logging stand out better and easier to grep.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
|
|
Likely candidate for this behaviour is the igt_fixture block. Seen in the CI by
running tests/kms_psr_sink_crc which is causing segfaults in the fixture block.
While at it fix some minor printing bugs.
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
CC: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Reported-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
While at it add SIGFPE as a crash signal.
v3: Remove calls to igt_assert_eq() as these are not async-safe. As one
user of this method remove the function pointer and recursive call.
(Chris Wilson)
v2: Added some helpers to avoid printf() inside a signal handler.
(Chris Wilson)
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Some validation teams seem to run tests out of source directories that
have been nfs mounted or rsync'd to different locations on the target
machine. This causes the igt_srcdir that the tests were built with to
be invalid on the machine the tests get run on. Add the current
directory as a final fallback for data file searches.
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=92248
Cc: Humberto Israel Perez Rodriguez <humberto.i.perez.rodriguez@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
|
|
Before we print the exitcode to the debug/kmsg logs, we should inspect
what its final value will be. For example, in the case of running
multiple subtests which all happen to be skipped, igt_exitcode is 0, but
the final exit code will be 77.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Tested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
32bit builds ran into a silly multiplication issue when computing
elapsed nanoseconds of more than 2s...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Transform
gem_exec_suspend: igt_core.c:1429: igt_stop_helper: Assertion `(((signed char) ((((__extension__ (((union { __typeof(status) __in; int __i; }) { .__in = (status) }).__i))) & 0x7f) + 1) >> 1) > 0) && (((__extension__ (((union { __typeof(status) __in; int __i; }) { .__in = (status) }).__i))) & 0x7f) == (proc->use_SIGKILL ? 9 : 15)' failed.
into
(gem_exec_suspend:16589) igt-core-DEBUG: Helper died too early with status=0
gem_exec_suspend: igt_core.c:1437: igt_stop_helper: Assertion `helper_was_alive(proc, status)' failed.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Cc: Marius Vlad <marius.c.vlad@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Useful for creating common setup code in igt_fixture which is only
needed by a subset of tests. And since I'm a good citizen it comes
with a library testcase/example included.
v2: Make testcase nastier to ensure a subtest group SKIPS when it's
parent is skipping already. I accidentally got this right, but let's
make sure.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
For the long running tests probing error conditions, throwing in the
signal interruptions is a good idea.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Oversight from the exit handler cleanup, spotted by Chris Wilson.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
No longer needed, and also not really a safe idea.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
The sync test is supposed to complete in 10s. But some bugs cause it to
run very, very slowly. As a defence against those, terminate the test if
we wait for more than 20s.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Added extended wildcard support when specifying --run-subtest.
Wildcard format is as specified in rfc3977 and the uwildmat() implementation
is taken from libinn.
See https://tools.ietf.org/html/rfc3977#section-4 for a description of
allowed wildcard expressions.
v2: Use comma as list separator (Ville Syrjala)
support both ^ and ! as not operators (Dave Gordon)
v3: Updated to use uwildmat() (Dave Gordon)
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
[danvet: Fixup whitespace. Add #include <stdint.h>. Run lint.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
line[strlen(line)] will always evaluate to NULL so line_continuation
was always true. That prevented the program name, pid and log level
ever being printed.
Changed to [strlen(line) - 1] so the last character before the null
terminator is compared with '\n' to determine line_continuation.
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
The extra_long_opts passed to igt_*_parse_opts() isn't modified,
so let's make it const.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
CLOCK_MONOTONIC_RAW is not affected by NTP, so it should be THE clock
used for timing execution of tests.
When fetching either the starting or ending time of a test, show the
time as -1.000s.
v6:
- Whitespace corrections (Chris)
v5:
- Do not use C99 style comments (Chris)
v4:
- Introduce time_valid macro (Chris)
- Reduce amount of boilerplate code for calculating elapsed time
v3:
- Do not exit directly from handler (Chris)
- Show elapsed time as -1 if it is not calculable
v2:
- Cache the used clock (Chris)
- Do not change the clock during execution
- Spit out and error if monotonic time can not be read
Cc: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Disable output of terminal control characters and progress meters when
IGT_PLAIN_OUTPUT is set in the environment.
Cc: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Make subtest results easier to identify by making them bold when the output
is a terminal.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
This allows multiple subtests to be specified using standard wildcard
characters when using the --run-subtest command line option.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Convenience wrapper suggested by Chris for igt_set_timeout(0, NULL).
v2: While at it add an empty line in kms_flip to make
set/reset_timeout a visual block.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
"Timed out" isn't a terribly informative message, allow users to set
something more informative. Inspired by a request from Jesse.
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Exit immediately if the test is already exiting and igt_fail is called.
This can happen if an igt_assert fails in an exit handler.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91349
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Looks better!
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
I often run "sudo ./test 2>&1 | tee output.txt", and when we're
succeeding - never printing to stderr - the output gets buffered and
is never flushed (because it doesn't point to a terminal), so I never
know which test is running. With this fflush, I'm able to know when
each test finishes.
v2: Add blank line too (Chris)
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
|
|
If we are in an interactive session, enable the locale. This allows for
features like setting thousand separators for printing large values. By
only enabling it for interactive terminals, we avoid changing outputs
for the test scripts (leaving them as the "C" locale).
Note this mainly affects the testcases, or binaries built using libigt.
Other binaries need to be localised separately.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
|
|
fatal_signal_handler() was trapping fatal errors but not
flagging the test as failing or setting an exit code.
The result was that the test would return Ok or Skipped
depending on what the other subtests did even though one
of the subtests had segfaulted.
Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
It can be useful to have one of those to carry state between the handler
parsing the options and the rest of the test. Right now the only thing
we can do is to use global variables for that.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we see a fatal signal in a subtest, fail.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The call to low_mem_killer_disable(true) was being done
from within function oom_adjust_for_doom. However,
oom_adjust_for_doom gets called from 3 places. We only
want the call to low_mem_killer_disable(true) to happen
during common_init, so call it from here instead of from
oom_adjust_for_doom.
v2:Thomas Wood pointed out that the initial call to disable
the low_mem_killer does not get made when we are just
listing subtests; so I have qualified the call from the
exit handler, which re-enables the low_mem_killer, with
if (!igt_only_list_subtests()).
For belt and braces I have also made low_mem_killer_disable
idempotent, so multiple calls to disable or re-enable are
safe.
Signed-off-by: Tim Gore <tim.gore@intel.com>
[Thomas: small coding style fix]
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Avoid having to escape certain characters in documentation comments by
not allowing docbook markup tags. Markdown formatting in documentation
comments is still supported.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Use a failure status code for timeout to avoid confusion between tests
that take too long to execute versus a failure due to an operation
taking longer than expected.
v2: Add a "timed out" message before exiting. (Daniel Vetter)
Fix the timeout library check by disabling hard errors in xfail
tests, since these share the same exit status as test failure.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Install the test programs by default so that they can be packaged.
Tested with the testdisplay test so that it still runs after the
modifications as it depends on a data file to be present. Need to
pass -r option to enable QR code display on success (PNG data file).
Packaging is useful when building a complete software stack for a
DUT from scratch. This should bring us closer to achieving a
built-from-scratch testing workflow.
Package maintainers can always decide to ignore the installed files.
v2:
- Install more tests including scripts and their data
v3:
- Add clarification to commit message about why we do this.
(Chris Wilson & Thomas Wood)
- Change libexec into pkglibexec to comply to standard
(Thomas Wood)
- Do not install $(common_files). (Thomas Wood)
- Make it really obvious the installed files are tests by using
tests directory name to avoid any confusion with packagers.
v4:
- Fixed commit message.
v5:
- Add file locator helper to retain backwards compatibility.
(Thomas Wood)
- Test with testdisplay -r option that draws the .png file.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Add rules to fix unused-result warnings when compiling with
_FORTIFY_SOURCE defined and apply them to the library and tests.
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Add an optional dependency on libunwind to print stack traces when a
test assertion fails.
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Apparently nobody else likes testing and debugging GEM coherency issues.
However, this also means that QA is skipping these vital tests. Split
out a set of canaries into igt/gem_concurrent_blit and keep the rest in
igt/gem_concurrent_all.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89497
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|