Age | Commit message (Collapse) | Author |
|
Silly compiler emitting warnings that just cause people to break code
attempting to silence the compiler.
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>
|
|
The variable used as loop counter in the igt_fixture macro had
unspecified value from the setjmp(3) man page quoted below. Because of
that, in certain circumstances and with -O2 and -Os, the initialization
of that variable would be eliminated and the compiler would complain of
uninitialized usage. Below can be found a snippet that reproduces the
problem with GCC 5.3.1 and 4.9.3 and the errors as printed by 5.3.1.
"The compiler may optimize variables into registers, and longjmp() may
restore the values of other registers in addition to the stack pointer
and program counter. Consequently, 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(3)
call;
· their values are changed between the calls to setjmp(3) and
longjmp(); and
· they are not declared as volatile."
static void test(void)
{
igt_subtest_group {
igt_fixture {
}
igt_subtest("foo") {
}
igt_fixture {
}
}
}
In file included from lib/intel_batchbuffer.h:8:0,
from lib/drmtest.h:39,
from lib/igt.h:27,
from tests/kms_addfb_basic.c:28:
tests/kms_addfb_basic.c: In function 'tiling_tests.isra.0':
lib/igt_core.h:110:43: warning: '__tmpint245' is used uninitialized in
this function [-Wuninitialized]
#define igt_fixture for (int igt_tokencat(__tmpint,__LINE__) = 0; \
^
lib/igt_core.h:110:43: note: '__tmpint245' was declared here
#define igt_fixture for (int igt_tokencat(__tmpint,__LINE__) = 0; \
^
lib/igt_core.h:148:31: note: in definition of macro '__igt_tokencat2'
#define __igt_tokencat2(x, y) x ## y
^
lib/igt_core.h:110:30: note: in expansion of macro 'igt_tokencat'
#define igt_fixture for (int igt_tokencat(__tmpint,__LINE__) = 0; \
^
tests/kms_addfb_basic.c:245:3: note: in expansion of macro 'igt_fixture'
igt_fixture {
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.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>
|
|
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>
|
|
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>
|
|
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>
|
|
Skip open-coding and assert that fds are valid.
Signed-off-by: Daniel Stone <daniels@collabora.com>
|
|
Similar to igt_assert_eq_*(), add variants for non-equality of types
other than int.
Signed-off-by: Daniel Stone <daniels@collabora.com>
|
|
Logical negation is hard.
v2: The second integer isn't plural (Daniel).
Cc: "Morton, Derek J" <derek.j.morton@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
If I have a program with the following:
igt_skip_on(i % 2 == 0);
igt_skip_on_f(i % 2 == 0, "i:%d\n", i);
igt_require(i % 2 == 0);
igt_require_f(i % 2 == 0, "i:%d\n", i);
then I'll get compiler error messages complaining about format
conversions related to the '%' character used in the mod operation. So
put the whole string as a %s argument to avoid interpreting '%' and
any other possible chars.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@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>
|
|
If we are using a streaming GGTT write into the source, we need to
trigger an early fault in order to obtain a mappable offset. This is
required when later we start reserving execbuf object top-down to try
and avoid mappable space!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
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>
|
|
If we see a fatal signal in a subtest, fail.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
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>
|
|
igt_interactive_debug should be defined in igt_core.c, rather than the
header, to avoid it being defined more than once.
Reported-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Found one user in gem_wait.c
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Remove options from argv that have been handled by getopt to allow
additional non-option parameters to be processed in the test application.
This fixes issues when using options such as --debug with tests that accept
additional non-option parameters.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Using defines removes an extra function call and prepares for changes
to the command line argument handling.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Use cmdline variable for interactive debug instead of env var.
v2: Make interactive-debug domain optional and use "all" when not set.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Log domains can be used to identify the source of log messages, such as
the test being run or the helper library.
v2: Add separate domains for different parts of the helper library and
use an empty default domain for applications.
Expand the log output to include the process name and the log level
of the message in addition to the domain and pid.
Print the expanded message only for warning and debug messages.
v3: check for glibc before using program_invocation_short_name
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
The IGT_TEST_DESCRIPTION macro can be used to define a description for a
test.
v2: Remove semicolon from end of macro (Damien Lespiau)
Add API documentation for the macro.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Currently tests that use igt_simple_main will simply call
"exit()" if they pass, making it difficult to ensure that
any required cleanup is done. At present this is not an
issue, but it will be when I submit a patch to turn off the
lowmemorykiller for all tests.
Signed-off-by: Tim Gore <tim.gore@intel.com>
[danvet: Also update api docs.]
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Minor tweak to embed the constant format string rather than passing it
to the vararg printf.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This just improves the language about the exact failure to reduce
confusion.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Reduce code duplication as the igt_stop_helper can reuse
igt_wait_helper() to replace its own waiting routine.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Convert simple tests to use igt_simple_init_parse_opts if they require
extra options.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
This function allows simple tests to register additional command line
options.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
SIGTERM is the normal signal to use when instructing a process to exit.
The only difference is that an unhandled SIGQUIT is meant to generate a
coredump, which is not what we want, but in practice I encountered an
issue where SIGTERM seemed to be deliverable more reliably than SIGQUIT
(in tests using multiple signal helpers).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|