summaryrefslogtreecommitdiff
path: root/lib/igt_core.h
AgeCommit message (Collapse)Author
2015-04-02tests: install test programs to libexecJoonas Lahtinen
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>
2015-03-26igt/gem_concurrent_blit: Separate out the combinatorial explosionChris Wilson
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>
2015-03-12lib: move igt_interactive_debug into igt_core.cThomas Wood
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>
2015-02-27lib: add igt_assert_ltDaniel Vetter
Found one user in gem_wait.c Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-25lib: small documentation fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-25lib: remove handled option arguments from argvThomas Wood
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>
2015-02-25lib: use defines for igt_simple_init and igt_subtest_initThomas Wood
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>
2015-01-20lib: s/IGT_DEBUG_INTERACTIVE/--interactive-debug=varRodrigo Vivi
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>
2015-01-16lib: use critical log level for assertion failure messagesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-01-16lib: add a critical warning levelThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-11lib: introduce log domainsThomas Wood
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>
2014-11-25lib: fix symbol names in documentation commentsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06lib: add the ability to include a description with a testThomas Wood
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>
2014-10-31lib/igt_core.h: add debug messages for test requirementsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-31lib/igt_core.h: fix igt_skip_on_f requirement messageThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-17lib: various documentation fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-30doc: various spelling and typo fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-29lib/igt_core: make single/simple tests use igt_exitTim Gore
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>
2014-09-06core: Prettify igt_require_f outputChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-29igt: Tweak the igt_assert_cmpint macroChris Wilson
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>
2014-08-29igt: Prettify igt_assert_eq() failure messagesChris Wilson
This just improves the language about the exact failure to reduce confusion. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-25core: Improve phrasing for test requirementsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-24igt_core: Refactor igt_stop_helper() to use igt_wait_helper()Chris Wilson
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>
2014-07-23lib: add an exit code to use when invalid options are specifiedThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-23tests: convert simple tests to use igt_simple_init_parse_optsThomas Wood
Convert simple tests to use igt_simple_init_parse_opts if they require extra options. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-23lib: add igt_simple_init_parse_optsThomas Wood
This function allows simple tests to register additional command line options. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-21Use SIGTERM in replace of SIGQUITChris Wilson
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>
2014-07-14lib/igt_core: Fixup gtkdoc for logging functionsDaniel Vetter
Without the () gtkdoc won't recognize them as function references. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-14lib: Add argc/argv to igt_simple_initDaniel Vetter
There's a pile of ideas around to add generally useful options like --debug to all igt tests. Or unify the runtime behaviour between simple and subtest tests a bit more. The first step to get there is to add argc/argv to igt_simple_init so that we can get at the argument list. Cc: Tim Gore <tim.gore@intel.com> Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-06-13lib: Introduce igt_fail_on/_fDaniel Vetter
I've yet again totally screwed things up (this time automated with cocci even, but not yet pushed luckily). So finally add a new version for easier conversion and adjust the cocci script. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-06-13lib/igt_core: Add igt_assert_eqDaniel Vetter
Suggested by Chris Wilson. Not yet rolled out since I'm trying to use cocci for this. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14lib: add exit status definesThomas Wood
Add defines for success, skip and timeout exit statuses. Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-05-14lib: add igt_set_timeoutThomas Wood
Add a function to stop and fail a test after the specified number of seconds have elapsed. Signed-off-by: Thomas Wood <thomas.wood@intel.com> Acked-by: Damien Lespiau <damien.lespiau@intel.com>
2014-03-22lib: unnecessary header removal for drmtest.h, part 2Daniel Vetter
I've left unistd.h in it - it's not strictly required but most users of drmtest.h want it for the open helpers, and then you kinda need to close that file descriptor again ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: more unecessary header removalDaniel Vetter
This time big with media_fill.h Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: remove uncessary #includes from headersDaniel Vetter
Only include what the header itself needs. The big fish here is intel-gpu-tools.h. More will follow. One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one of which was broken. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-14lib/igt_core: add printf attribute to igt_vlogDaniel Vetter
I didn't know that this also works for the varargs versions of format strings. But gcc was kind enough to let me know. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13lib: add igt_vlog to print varargsDaniel Vetter
... and put it to immediate use in igt_display_log. To make this all add up also drop the return value of igt_display_log, no one really cared anyway. Aside: I've noticed that every time another subtest runs (at least with kms_pipe_crc_basic) the log indent level moves one up ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib/igt_core: api documentationDaniel Vetter
At most a bit of comment of function declaration movement for more polish. One tricky bit is to #ifdef out (only for gtkdoc of course) the struct option; forward declaration - gtkdoc needlessly lists it. FIXME: The struct documentation for igt_helper_process somehow doesn't get picked up ... Same issue seems to be with the igt_log_level enum, I've shoveled the relevant documentation into igt_log in free-form for now. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12lib: extract igt_core.cDaniel Vetter
Same game as with ioctl_wrappers.c. To split was rather clean except for the static function oom_adjust_for_doom. But that was a bug, the calls to it in the various open helpers should simply be done at init and fork time. Which was already the case, except for simple testcase. So fix it up. While at it also start with a small section header for the documentation. v2: Don't forget to update the xml template ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>