summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
AgeCommit message (Collapse)Author
2016-02-08igt/vc4_create_bo: Test various paths in BO creation.Eric Anholt
create-bo-0 fails on the current kernel, and it's something I want to fix. v2: Use do_ioctl_err(). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-02-08igt/vc4_wait_bo: Add a test for VC4's wait-for-BO ioctl.Eric Anholt
The pad subtest fails currently. v2: Use do_ioctl() and do_ioctl_err(). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-02-08igt/vc4_wait_seqno: Add a test for VC4's wait-for-seqno ioctl.Eric Anholt
v2: Use do_ioctl_err(). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-12-16tests: remove .gitignore and add a Makefile rule to create itThomas Wood
v2: generate the .gitignore file with the default target v3: remove the .gitignore file Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-28tests/pm_rc6_residency: Measure the sleep durationVille Syrjälä
The code is confused about the units of CODE_TIME. The comment says 50 microsseconds, but the actual code makes it 50 milliseconds. Avoid the whole mess by measuring the sleep duration ourselves. Since the time measurement is taken around the whole operation it obviously includes a bit of extra, but at least it's much less than the fixed 50 ms. For instance on one VLV board I now get something like this: - Residency in rc6 or deeper state: 3002 ms (ratio to expected duration: 0.98) + Residency in rc6 or deeper state: 3001 ms (sleep duration 3003 ms) (ratio to expected duration: 1.00) so the reported ratio is now much closer to reality. Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-08tests/tools: add --as-needed to linker flagsThomas Wood
Add --as-needed to the linker flags to reduce the number of shared library dependencies, since not all the tests and tools use all the libraries required by the helper library (for example, many tests do not use cairo). This helps portability of the binaries and also makes a very small improvement to the execution speed and memory consumption. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-02build: Add -lm to testsDamien Lespiau
Since the introduction of igt_stats and its usage in gem_exec_nop, we need to link the tests against libm. My rebasing bot complained when linking gem_exec_nop: lib/igt_stats.c:492: undefined reference to `sqrt' Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-04-14tests: install the test listThomas Wood
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-14tests: create a single combined test listThomas Wood
All tests now respond in a consistent way such that separate lists for tests with and without subtests are no longer necessary. v2: fix other references to the test list Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-08tests: use standard install prefix for programs, scripts and dataThomas Wood
Use the pkglibexec and pkgdata prefixes rather than setting bindir and datadir. This also removes the extra 'tests' directory from within the package libexec and data directories. Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-08tests: ensure scripts and data are included in the distributionThomas Wood
Prefix the test scripts and data variables with dist_ to ensure they are included in the distribution. Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-02tests/gem_concurrent.c: rename to gem_concurrent_allTim Gore
Recent patch #7763349a9a87.. renamed gem_concurrent_blit.c to gem_concurrent.c and then added entries to Makefile.am to make two identical executeables (but with different names) from this source file. This executeable changes its behaviour based on argv[0]. But, this has broken the Android build, which does not use autotools. This patch instead renames the source file to match the name of one executable (gem_concurrent_all.c) and creates a second source file which simply #includes the first. The Makefile.am entries are also removed. This restores the simple test.c -> test executeable relationship seen in the rest of IGT and allows the Android build system to work without parsing Makfile.am or having to incorporate a special workaround for this test. Signed-off-by: Tim Gore <tim.gore@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
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-26Add default debug flags for testsThomas Wood
Include debugging symbols in tests by default to improve stack traces and also set the compiler optimisation level to improve the debugging experience. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-26lib: print a stack trace when a test assertion failsThomas Wood
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>
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-02-13tests/gem_wait: Adjust makefileDaniel Vetter
I've forgotten to do this in commit e4753d2d96fbb88077e70820793137f45f02c9ba Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Mon Sep 29 14:42:33 2014 +0200 tests/gem_wait_render_timeout: Convert to subtests Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_mmap_wc: Exercise mmap(wc) interfaceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-12-17igt: Add gem_ctx_thrash to fill the GGTT with contextsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-12tests: ensure the script based tests are included in the distributionThomas Wood
TESTS_scripts was accidentally removed from EXTRA_DIST in commit 685e577 (Move library selftests to lib/tests). Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-29Move library selftests to lib/testsDaniel Vetter
Again they're not really igt testcases so are in the way of running spatch unconditionally. Move them someplace else. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-18tests: Add drm_import_exportDaniel Vetter
Multithreaded test to validate the (lack of) locking in the flink/open code in libdrm-intel. Based on a testcase from Rafel Sapala. Cc: Rafal Sapala <rafal.a.sapala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-23build: improve version.h generationThomas Wood
Move version.h generation into lib/Makefile.sources so that it can be shared between the Autotools and Android build systems. Also make sure the "updating version.h" message is only displayed when version.h actually changes and remove unnecessary includes of version.h. This also includes changes from Tvrtko Ursulin to prevent a build from within the git repository failing when git is not available. Signed-off-by: Thomas Wood <thomas.wood@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
2014-07-15tests/gem_userptr_blits: Race between object creation and multi-threaded mm opsTvrtko Ursulin
Userptr v23 was not thread safe against memory map operations and object creation from separate threads. MMU notifier callback would get triggered on a partially constructed object causing a NULL pointer dereference. This test excercises that path a bit. In my testing it would trigger it every time and easily, but unfortunately a test pass here does not guarantee the absence of the race. v2: Added explicit cancellation point and removed the stop flag. Use only igt_assert(). Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-06-12igt/gem_fence_upload: Throw some threads into the mixChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-12igt/gem_mmap_gtt: Exercise concurrent pagefaultingChris Wilson
This should hit the BUG inside remap_pfn_range in commit c5158fabeaf53ed2c614c3333aaa4b3cce80f500 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Jun 10 12:14:41 2014 +0100 [ 27.767634] kernel BUG at mm/memory.c:2315! [ 27.767655] invalid opcode: 0000 [#1] SMP [ 27.767679] Modules linked in: cpufreq_userspace cpufreq_powersave cpufreq_stats cpufreq_conservative binfmt_misc nfs lockd fscache sunrpc hid_generic usbhid hid x86_pkg_temp_thermal microcode i2c_i801 lpc_ich mfd_core battery acpi_cpufreq evdev processor ac loop ehci_pci xhci_hcd ehci_hcd sr_mod usbcore cdrom usb_common fan thermal [ 27.767872] CPU: 3 PID: 912 Comm: gem_mmap_gtt Not tainted 3.15.0-rc8+ #953 [ 27.767903] Hardware name: Intel Corporation Shark Bay Client platform/Flathead Creek Crb, BIOS HSWLPTU1.86C.0109.R03.1301282055 01/28/2013 [ 27.767956] task: ffff880448415010 ti: ffff88044d22c000 task.ti: ffff88044d22c000 [ 27.767988] RIP: 0010:[<ffffffff81130734>] [<ffffffff81130734>] remap_pfn_range+0x2a4/0x400 [ 27.768033] RSP: 0000:ffff88044d22fc28 EFLAGS: 00010282 [ 27.768057] RAX: 0000000000020002 RBX: 00000000000a3b57 RCX: ffff880448b73fe8 [ 27.768088] RDX: 0000000000000002 RSI: ffff880000000000 RDI: ffffea000efe8158 [ 27.768119] RBP: ffff88044d22fcd8 R08: 00007fc7b57fe000 R09: 00007fc7b57fe000 [ 27.768150] R10: 00000000000001fd R11: 0000000000000a9a R12: ffffea000efe8128 [ 27.768180] R13: 0000000000000001 R14: 00007fc7b57fd000 R15: 800000000000002f [ 27.768212] FS: 00007fc7977fc700(0000) GS:ffff88045e380000(0000) knlGS:0000000000000000 [ 27.768246] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 27.768272] CR2: 00007fc7b67fd000 CR3: 000000044866c000 CR4: 00000000001407e0 [ 27.768303] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 27.768333] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 27.768363] Stack: [ 27.768374] ffff880448bbb6f8 00000000ffffffff 00007fc7b57fdfff 00007fc7b57fdfff [ 27.768414] 00007fc7b57fe000 ffff88044866c7f8 ffff8804496b08f0 00007fc7b57fdfff [ 27.768454] fffffff8038ee35a 0000000000001000 ffff88044c208180 00007fc7b57fe000 [ 27.768494] Call Trace: [ 27.768511] [<ffffffff81365277>] i915_gem_fault+0x337/0x340 [ 27.768538] [<ffffffff8112d3c4>] __do_fault+0x34/0x70 [ 27.768565] [<ffffffff8109088e>] ? wake_up_process+0x1e/0x40 [ 27.768592] [<ffffffff8113015c>] do_shared_fault.isra.96+0x2c/0x1f0 [ 27.768623] [<ffffffff81502405>] ? rwsem_down_read_failed+0xe5/0x130 [ 27.768654] [<ffffffff810a2519>] ? __rwsem_do_wake+0x129/0x160 [ 27.768682] [<ffffffff81131085>] handle_mm_fault+0x2b5/0xb80 [ 27.768712] [<ffffffff81270a64>] ? call_rwsem_down_read_failed+0x14/0x30 [ 27.768745] [<ffffffff81036c67>] __do_page_fault+0x167/0x4c0 [ 27.768774] [<ffffffff8109a540>] ? pick_next_task_fair+0x700/0x870 [ 27.768804] [<ffffffff814ff23b>] ? __schedule+0x27b/0x860 [ 27.768831] [<ffffffff81036fec>] do_page_fault+0xc/0x10 [ 27.768857] [<ffffffff815034a2>] page_fault+0x22/0x30 [ 27.768881] Code: 4d 85 ed 49 0f 44 d7 80 cc 02 49 81 c6 00 10 00 00 48 83 c3 01 48 83 c1 08 48 09 d0 48 89 41 f8 4d 39 f0 74 32 48 83 39 00 74 c4 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 48 39 37 75 63 48 8b 45 c8 [ 27.769081] RIP [<ffffffff81130734>] remap_pfn_range+0x2a4/0x400 [ 27.769113] RSP <ffff88044d22fc28> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-30tests: Fix make depencies for test listDaniel Vetter
Oops, pretty bad ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-07gem_tiled_swapping: Test using all available fencesChris Wilson
Use extra threads to cause extra memory pressure and stress upon the relevant code. Limit the number of threads to available fences to avoid falling off the fence cliff. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-02tests: create files that list the available testsThomas Wood
Add Makefile targets to create two text files containing the list of available single and multi-test programs. This enables the tests to be enumerated without requiring the build system. Signed-off-by: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-21fix out-of-tree buildsAdrian Negreanu
version.h is -include-ed assuming that builddir is the same as srcdir; In file included from <command-line>:0:0: ./../../tests/../lib/check-ndebug.h:3:1: fatal error: ../../tests/../version.h: No such file or directory #endif ^ v2: Use top_builddir as suggested by Damien - builddir gets expanded to ./ which worked accidentally since automake includes top_builddir by default. Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com> (v1) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-21kms_flip: Add dpms-vs-vblank-race and modeset-vs-vblank-race subtestsVille Syrjälä
dpms-vs-vblank-race and modeset-vs-vblank-race try to race wait for vblank ioctls from one thread against modeset/dpms ioctls from another. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-02-21tests: Compile all threaded tests with -pthread when appropriateChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-21tests/gen7_forcewake_mt: use -lpthreadPaulo Zanoni
Otherwise it fails to compile on my machine. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-02-04fix make distcheckDaniel Vetter
Bunch of explicit include paths needed adjustments and eviction_common.c needs to be added to the dist files. This has been broken in the following three commits: commit 42bcd05eb3f1545fbf9c397c3f37c3f6a27c5da4 Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Date: Mon Feb 3 10:59:41 2014 +0000 tests/eviction_common: Avoid submitting duplicate objects commit b92b397d5e4ffe10ed92fb2fc6711758ef5bcf89 Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Date: Tue Dec 3 15:09:57 2013 +0000 build: Make sure asserts are enabled for tests commit 8c33e9ad111d27b84db4daac43809a807f262632 Author: Ben Widawsky <benjamin.widawsky@intel.com> Date: Fri Dec 6 20:35:29 2013 -0800 intel-gpu-tools: Version informatio Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10intel-gpu-tools: Version informationBen Widawsky
Provide two arguments version, and verbose, which allow printing from an arbitrary igt test. It will show system information (from build time, not runtime), as well as the git SHA being used. This will help reduce errors when people try to reproduce problems. As an example if I want to verify someone is running the correct version of a test, I could ask them to do: bwidawsk@ironside ~/intel-gfx/intel-gpu-tools (master)$ sudo ./tests/gem_exec_nop --verbose gem_exec_nop-git-3c5423b (Linux ironside 3.12.0-1-ARCH #1 SMP PREEMPT Wed Nov 6 09:06:27 CET 2013 x86_64 GNU/Linux) Time to exec x 1: 35.000µs (ring=render) Time to exec x 2: 28.000µs (ring=render) Time to exec x 4: 20.000µs (ring=render) Time to exec x 8: 14.625µs (ring=render) Time to exec x 16: 11.188µs (ring=render) Time to exec x 32: 11.125µs (ring=render) Time to exec x 64: 10.328µs (ring=render) Time to exec x 128: 10.172µs (ring=render) Time to exec x 256: 10.234µs (ring=render) Time to exec x 512: 10.232µs (ring=render) Time to exec x 1024: 10.121µs (ring=render) Time to exec x 2048: 10.151µs (ring=render) Time to exec x 4096: 11.474µs (ring=render) Time to exec x 8192: 9.432µs (ring=render) Time to exec x 16384: 6.003µs (ring=render) Time to exec x 32768: 5.029µs (ring=render) Time to exec x 65536: 4.206µs (ring=render) Time to exec x 131072: 3.630µs (ring=render) Subtest render: SUCCESS --verbose is provided for completeness, but doesn't seem too useful at the moement. bwidawsk@ironside ~/intel-gfx/intel-gpu-tools (master)$ sudo ./tests/gem_exec_nop --version gem_exec_nop-git-3c5423b (Linux ironside 3.12.0-1-ARCH #1 SMP PREEMPT Wed Nov 6 09:06:27 CET 2013 x86_64 GNU/Linux) I've put version.h in the root directory so that any subdir can access it. I've added the tests usage since it's immediately useful, and done easily via Daniels igt infrastructure work. v2: - Always print the version number. - We want to print uname at runtime. - Also prefix the i-g-t release version. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> (v1) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-03build: Make sure asserts are enabled for testsTvrtko Ursulin
Tests depend on assertions being enabled since they can, and do, contain actual test steps. They are also mandatory for ensuring sane test case behaviour. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12build: Move logic to tests/Makefile.am and away from Makefile.sourcesOscar Mateo
Makefile.sources is just a listing with all the sources, and the logic to use these sources goes into either Makefile.am (automake) or Android.mk (make). Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12build: list all test/tool/lib source files in their own Makefile.sourcesOscar Mateo
In this way, all source files are listed in Makefile.sources and included from Makefile.am, thus enabling the reuse from Android makefiles. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-06tests: pm_psrRodrigo Vivi
Check on debugfs if PSR is supported by panel and matching all conditions in hardware. In this case PSR must be enabled and performance counting increasing v2: check if performance counter is really increasing. v3: respect new naming convention Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-11-04tests: establish core_ prefixDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04tests: Use kms_ prefix a bit moreDaniel Vetter
I was a bit on the fence about the basic pipe CRC test since that doesn't really test kms, but debug infrastructure in debugfs. Otoh running this one for a full kms testrun is always good, to make sure that all the other (real) CRC based tests work sanely. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04tests: establish pm_ prefixDaniel Vetter
Imo power management, power consumption and performance are tightly enough coupled that we can throw them all into one bin. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04tests: estbalish drv_ prefixDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01tests: igt_no_subtestDaniel Vetter
Yet another check for the library. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01tests: Add a Makefile comment about the expected failures in igt_ testsDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01tests: Add a test templateDaniel Vetter
Requested by Paulo. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: add more self-tests around the igt_exit checks.Daniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: fix igt_exit assert when only listing subtests.Daniel Vetter
Ooops. Reported by Paulo. Also add a new testcase for make check to make sure this actually works. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-29gem_close_race: Fix linker flagsBen Widawsky
Seems the -lpthread was missed in commit 8f771f3facae133bb72216fa05c74bc817920b6d Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Oct 29 14:21:29 2013 +0000 gem_close_race: Also test random closing of active fd Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-10-28tests: Add gem_close_raceChris Wilson
The intention is to exercise #70784. Yet the first challenge is make the test suite happy.