Age | Commit message (Collapse) | Author | Files | Lines |
|
For typical debugging under gdb one can specify two main usecases:
accessing and manupulating resources created by the application and
manipulating thread execution (interrupting and setting breakpoints).
This test adds coverage for the former by checking that:
- the debugger reports the expected events for Xe resources created
by the debugged client,
- the debugger is able to read and write the vm of the debugged client.
Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Christoph Manszewski <christoph.manszewski@intel.com>
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com>
Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
Signed-off-by: Pawel Sikora <pawel.sikora@intel.com>
Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Link: https://lore.kernel.org/r/20240918113017.144687-13-christoph.manszewski@intel.com
|
|
Introduce library which simplifies testing of eu debug capability.
The library provides event log helpers together with asynchronous
abstraction for client proccess and the debugger itself.
xe_eudebug_client creates its own proccess with user's work function,
and gives machanisms to synchronize beginning of execution and event
logging.
xe_eudebug_debugger allows to attach to the given proccess, provides
asynchronous thread for event reading and introduces triggers - a
callback mechanism triggered every time subscribed event was read.
To build the eudebug testing framework 'xe_eudebug' meson build option
has to be enabled, as it is disabled by default.
Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuaoppala@linux.intel.com>
Signed-off-by: Christoph Manszewski <christoph.manszewski@intel.com>
Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
Signed-off-by: Pawel Sikora <pawel.sikora@intel.com>
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com>
Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Link: https://lore.kernel.org/r/20240918113017.144687-11-christoph.manszewski@intel.com
|
|
Swap the default value so xe tests are built by default. Once CI and
others are adapted, then the option can be removed.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Change the build default for Xe driver tests to disabled,
in order to prevent distros to ship them by accident.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
The Xe driver is currently under heavy development and has not
merged upstream yet. While merging doesn't happen, the API may
still change, as upstream may request changes on it and/or
driver developers may need to tweak some API bits.
While this is happening, incompatible API changes may still
happen. As IGT is distributed on some distros, placing Xe
tests on binaries is not a good idea, as such tests may fail
when the final version gets released.
So, add a build option to allow disabling Xe driver builds.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Building IGT with Sphinx enabled and rst2pdf installed takes:
$ touch tests/xe/xe_compute.c
$ time ninja -C build
...
real 0m10.545s
user 0m13.778s
sys 0m0.724s
With Sphinx disabled, the same build is a lot faster:
$ touch tests/xe/xe_compute.c
$ time ninja -C build
...
real 0m1.746s
user 0m1.574s
sys 0m0.171s
As Sphinx and PDF outputs aren't something that every single
IGT developer would need, let's speedup the build by disabling
it by default.
Test plan and test documentation validation will still run,
as this is a necessary step to validate if the tests documentation
were not broken on a patch, but this will save some time during
normal builds.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Acked-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
|
|
Add the remaining changes at meson for it to build Xe documentation.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
By default, the latest Git commit hash is always used to create the
version string embedded in libigt - if libigt changes, most targets are
marked as "dirty" and need to be relinked. This makes it difficult to
easily compare two IGT builds on binaries alone.
This commit introduces a new Meson option, -Dversion_hash="your text!",
which allows overriding this hash, for instance under CI builds.
Signed-off-by: Ryszard Knop <ryszard.knop@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Hardcoding a build source path inside a binary when cross compiling isn't
appropriate and breaks build reproducibility. Allow the srcdir to be
specified by an optional configuration option to meson which can
be used to override with the correct path.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
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>
|
|
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>
|
|
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>
|
|
This new test ensures DisplayPort audio works by using the Chamelium.
It enables the DisplayPort output and sends an audio signal containing a set of
frequencies we choose to all HDMI/DisplayPort audio devices. It starts
recording audio on the Chamelium device and uses the stream server to retrieve
captured audio pages. It then checks that the capture audio signal contains the
frequencies we sent, and only those, by computing a FFT.
A new library has been added to libigt to communicate with the stream server.
It implements a simple custom TCP protocol.
In case the test fails, a WAV file with the captured data is saved on disk.
Right now the test has a few limitations:
- Only the first channel is checked
- IGT only generates audio with a single sampling rate (48 KHz)
- Audio data is not captured in real-time
These limitations will be lifted in future patches.
PulseAudio must not run during the tests since ALSA is used directly. To ensure
this, edit /etc/pulse/client.conf and add `autospawn=no`. Then run
`pulseaudio --kill`.
This commit deletes the existing audio tests. They weren't run and required an
exotic configuration (HDMI audio splitter, dummy HDMI sink and a line-in port
on the DUT).
This patch also changes lib/igt_audio to use uint16_t instead of short. The
rationale is:
- The standard says a short is at least 16 bit wide, but a short can be
larger (in practice it won't happen, but better use types correctly)
- It makes it clearer that the audio format is S16_LE, since "16" is
in the type name.
This patch depends on the following Chameleon bugs:
- https://crbug.com/948060
- https://crbug.com/950857
Signed-off-by: Simon Ser <simon.ser@intel.com>
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
|
|
Apparently it's really not great to require it for a bunch of
platforms. Requested by Sean and Eric.
v2: Use combo option (Petri).
v3: Fix the right option (Petri)
v4: try a bit harder ...
v5: Even more simplification (Dylan)
Cc: Dylan Baker <dylan@pnwbakers.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net> (v1)
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
This is a new test runner to replace piglit. Piglit has been very
useful as a test runner, but certain improvements have been very
difficult if possible at all in a generic test running framework.
Important improvements over piglit:
- Faster to launch. Being able to make assumptions about what we're
executing makes it possible to save significant amounts of time. For
example, a testlist file's line "igt@somebinary@somesubtest" already
has all the information we need to construct the correct command
line to execute that particular subtest, instead of listing all
subtests of all test binaries and mapping them to command
lines. Same goes for the regexp filters command line flags -t and
-x; If we use -x somebinaryname, we don't need to list subtests from
somebinaryname, we already know none of them will get executed.
- Logs of incomplete tests. Piglit collects test output to memory and
dumps them to a file when the test is complete. The new runner
writes all output to disk immediately.
- Ability to execute multiple subtests in one binary execution. This
was possible with piglit, but its semantics made it very hard to
implement in practice. For example, having a testlist file not only
selected a subset of tests to run, but also mandated that they be
executed in the same order.
- Flexible timeout support. Instead of mandating a time tests cannot
exceed, the new runner has a timeout on inactivity. Activity is
any output on the test's stdout or stderr, or kernel activity via
/dev/kmsg.
The runner is fairly piglit compatible. The command line is very
similar, with a few additions. IGT_TEST_ROOT environment flag is still
supported, but can also be set via command line (in place of igt.py in
piglit command line).
The results are a set of log files, processed into a piglit-compatible
results.json file (BZ2 compression TODO). There are some new fields in
the json for extra information:
- "igt-version" contains the IGT version line. In
multiple-subtests-mode the version information is only printed once,
so it needs to be duplicated to all subtest results this way.
- "dmesg-warnings" contains the dmesg lines that triggered a
dmesg-warn/dmesg-fail state.
- Runtime information will be different. Piglit takes a timestamp at
the beginning and at the end of execution for runtime. The new
runner uses the subtest output text. The binary execution time will
also be included; The key "igt@somebinary" will have the runtime of
the binary "somebinary", whereas "igt@somebinary@a" etc will have
the runtime of the subtests. Substracting the subtest runtimes from
the binary runtime yields the total time spent doing setup in
igt_fixture blocks.
v2:
- use clock handling from igt_core instead of copypaste
- install results binary
- less magic numbers
- scanf doesn't give empty strings after all
- use designated array initialization with _F_JOURNAL and pals
- add more comments to dump_dmesg
- use signal in kill_child instead of bool
- use more 'usual' return values for execute_entry
- use signal number instead of magic integers
- use IGT_EXIT_INVALID instead of magic 79
- properly remove files in clear_test_result_directory()
- remove magic numbers
- warn if results directory contains extra files
- fix naming in matches_any
- construct command line in a cleaner way in add_subtests()
- clarify error in filtered_job_list
- replace single string fprintfs with fputs
- use getline() more sanely
- refactor string constants to a shared header
- explain non-nul-terminated string handling in resultgen
- saner line parsing
- rename gen_igt_name to generate_piglit_name
- clean up parse_result_string
- explain what we're parsing in resultgen
- explain the runtime accumulation in add_runtime
- refactor result overriding
- stop passing needle sizes to find_line functions
- refactor stdout/stderr parsing
- fix regex whitelist compiling
- add TODO for suppressions.txt
- refactor dmesg parsing
- fill_from_journal returns void
- explain missing result fields with TODO comments
- log_level parsing with typeof
- pass stdout/stderr to usage() instead of a bool
- fix absolute_path overflow
- refactor settings serialization
- remove maybe_strdup function
- refactor job list serialization
- refactor resuming, add new resume binary
- catch mmap failure correctly
v3:
- rename runner to igt_runner, etc
- add meson option for building the runner
- use UPPER_CASE names for string constants
- add TODO comments for future refactoring
- add a midding close()
- const correctness where applicable
- also build with autotools
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Distributions want explicit control over optional parts so they can
state runtime dependencies before building. Let's restore the
functionality autotools used to provide.
Where possible, the selection is done by choosing whether to build a
particular item and the option name is build_$item. Example:
build_overlay. Where not possible, the option name is
with_$item. Example: with_valgrind.
Array options require a bump of required meson version to 0.44. Debian
stable has meson 0.37 which is already too old, stable-backports has
0.45, CI uses 0.45. Mesa's meson requirement is 0.44.1, for a
perspective.
Note, the old hack for not building docs when cross-compiling is
gone, as doc building can be explicitly controlled now.
v2: glib not optional
v3: bump meson version to 0.44
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Eric Anholt <eric@anholt.net>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Meson builds libigt as a shared library, and executables naturally
have to find it at runtime. Using default options puts the library to
a normal search paths, but any modifications to the directory options
or a non-conventional prefix setting makes using LD_LIBRARY_PATH or
other library search means mandatory.
Add a build option 'use_rpath' (default: false) that makes meson set
up DT_RUNPATH at install time, pointing to the library with a path
relative to the executable, using $ORIGIN. That way the installed
executables find the library even when not installed to exactly the
build-time configured prefix path, a setup CI occasionally uses.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Tested-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|