summaryrefslogtreecommitdiff
path: root/meson.build
AgeCommit message (Collapse)Author
2022-04-14scripts/meson.build: install code coverage scriptsMauro Carvalho Chehab
Those scripts are needed at runtime. So, place them under bindir. Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2021-10-07include: Introduce linux-uapi for non-drm-uapi files.Rodrigo Vivi
sync_file.h is needed for dma-buf, but it is part of the linux-uapi include dir. The patch aims to have a drm-uapi directory that is a pure copy of the generated drm-uapi include dir. Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2021-05-21lib/i915/perf: have python scripts a custom_target inputLionel Landwerlin
That way when changing the scripts, the generated files are regenerated. This change makes python3 an explicit hard dependency, but that was already the case for lib/i915/perf. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
2021-04-23Update NEWS, bump version to 1.26.Petri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Arkadiusz Hiler <arek@hiler.eu>
2021-03-26lib: Introduce the igt_nouveau libraryLyude Paul
This introduces the igt_nouveau library, which enables support for tiling formats on nouveau, along with accelerated clears for allocated bos in VRAM using the dma-copy engine present on Nvidia hardware since Tesla. Typically the latter would be handled by the kernel automatically, which is the long-term plan for nouveau, but since the kernel doesn't yet support that we implement this in igt in order to fulfill the expectation that most of igt has in which newly allocated fbs are expected to be zero-filled by default. The dma-copy engine is capable of fast blitting, and is also able to perform tiling/untiling at the same time. This is worth mentioning because unlike many of the other drivers supported in igt, we go out of our way to avoid using mmap() in order to perform CPU rendering wherever possible. Instead of mmap()ing an fb that we want to draw to on the CPU (whether it be for converting formats, or just normal rendering), we instead use dma-copy to blit linear/tiled fbs over to linear system memory which we mmap() instead. This is primarily because while mmap() is typically painfully slow for vram, it's even slower on nouveau due to the current lack of dynamic reclocking in our driver. Furthermore, using the dma-copy engine for copying things over to system ram is also dramatically faster than using igt's memcpy wc helpers even when no tiling is involved. Such speed improvements are both quite nice, but also very necessary for certain tests like kms_plane that are rather sensitive when it comes to slow rendering with drivers. This doesn't mean we won't want to provide a way of using mmap() for rendering in the future however, as at least basic testing of mmap() is certainly something we eventually want for nouveau. However, I think the best way for us to do this in the future will be to adapt the igt_draw API to work with nouveau so we can explicitly request using mmap() in tests which need it. Finally, this code also adds a hard dependency on libdrm support for nouveau tests. The main reason for this is currently there are no real applications that use nouveau's ioctls directly (mesa for instance, uses libdrm as well) and also that nouveau's ioctls are currently a bit complicated to use by hand. This will likely be temporary however, as Ben Skeggs is planning on revamping a lot of nouveau's APIs to simplify them and make libdrm support for nouveau obsolete in the future. Note that we take care to make sure that users can still disable libdrm support for nouveau if needed, with the only caveat being that any tests using igt_nouveau will be disabled, along with any tiling support for nvidia-specific tiling formats. This should enable igt tests which test tiling formats to run on nouveau, and fix some seemingly random test failures as a result of not having zero-filled buffers in a few other tests like kms_cursor_crc. Changes since v1: * Remove leftover rebase detritus in drm_fourcc.h Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Martin Peres <martin.peres@mupuf.org> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Jeremy Cline <jcline@redhat.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2021-02-01meson: Turn off -WerrorPetri Latvala
No, we don't want all warnings ever to be errors. While being rid of compile warnings (especially the more obscure ones from future compilers) is great, having it on always is not acceptable. It's not even on "by default", it was non-overrideably set on. Not to mention adding -Werror to compiler flags is the incorrect way of turning it on. Use the meson command line flag --werror instead on whatever local checkout or company-internal fork you're using, where you have control over which compilers are used. Turning it on unconditionally in an upstream repository for all current and future compilers is never ok. This partially reverts commit e02612921a4e95aef3a368e7468f4337c9dcee7d. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Arkadiusz Hiler <arek@hiler.eu> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2021-01-30meson: Turn on -WerrorAshutosh Dixit
We can choose which compile warnings to enable, but once they are enabled treat all warnings as error. This enforces stricter checks against compile warnings creeping in. v2: Fix redefinition warning errors from i915/gem_userptr_blits v3: Fix the even more pedantic clang compilation v4: Do not alter whitespace in lib/tests/igt_describe! Note: clang does not build assembler/ Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-03-20Update NEWS, bump version to 1.25Arkadiusz Hiler
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2020-03-20meson: Add -fcommon to cc_flagsLyude Paul
Now that we've fixed a bunch of build breakages on systems where -fcommon is the default (gcc 10+), let's start building with -fcommon by default so we can make sure things don't break with this in the future. Supposedly it's supposed to be able to generate better code anyway! Signed-off-by: Lyude Paul <lyude@redhat.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2020-02-10meson: Port cpuid.h test from configure.acNicolas Boichat
When cross-compiling for arm64, we noticed that the header file may be present, but it is not functional: /usr/lib64/clang/10.0.0/include/cpuid.h:11:2: error: this header is for x86 only Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-10-09meson: Remove redundant install params from configure_filePetri Latvala
The 'install' param for configure_file was added in meson 0.50, and does nothing before that. When using meson >= 0.50 using the install param gives a warning if the minimum required meson version is lower than 0.50, because of reasons. 'install : false' is the default anyway when install_dir param is not set, so remove the redundant and erroneous install param usages. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-09-17meson: Bump required version to 0.47.2Arkadiusz Hiler
Any distribution that decided to go with 0.47 should also pack the latest point release. For us 0.47.2 is important because it fixes the weird issues with using a 'feature' option as a dependency()'s 'required' parameter, e.g.: option('oping', type : 'feature', description : 'Build test runner with liboping for pinging support') liboping = dependency('liboping', required: get_option('oping')) With liboping not installed and oping option having the default "auto" value this should execute just fine and liboping.found() should == false, but instead we get "ERROR: Native dependency 'liboping' not found". That behavior is fixed with 0.47.2. Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-09-09build: Ignore warnings for address of packed membersChris Wilson
We've started using packed arrays and gcc has started warning about that. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-07-16build: rename Meson optionsSimon Ser
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>
2019-07-08docs: Embed subtest descriptions in the documentationArkadiusz Hiler
This rewrites generate_description_xml in Python, so that we generate properly escaped XML. The switch also makes the code more manageable. Changes in the generated docbook: 1. subtests are not simply listed anymore, they are now another (sub)section 2. subtests are now linkable, e.g. docs/igt-kms-tests.html#kms_hdmi_inject@inject-4k 3. subtest's section now includes output of --describe Python is required already by gtk-doc and we are not using anything other than the standard library. v2: keep the part of the subtest name after the last match (Simon) explicitly require python3 (Petri) v3: make sure that the tail of the subtest name after the last keyword match is included (Simon) Cc: Daniel Vetter <daniel@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> Acked-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Simon Ser <simon.ser@intel.com>
2019-06-25meson: add libatomic dependencyGuillaume Tucker
Add conditional dependency on GCC's libatomic in order to be able to use the __atomic_* functions instead of the older __sync_* ones. The libatomic library is only needed when there aren't any native support on the current architecture, so a linker test is used for this purpose. This makes atomic operations available on a wider number of architectures including MIPS. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> Reviewed-by: Simon Ser <simon.ser@intel.com>
2019-06-20Update NEWS, bump version to 1.24.Petri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-05-23meson: Start using 'feature' optionsArkadiusz Hiler
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>
2019-05-20meson: Remove invalid required argumentPetri Latvala
declare_dependency doesn't take a 'required' argument. meson.build:207: WARNING: Passed invalid keyword argument "required". WARNING: This will become a hard error in the future. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Simon Ser <simon.ser@intel.com> Reviewed-by: Simon Ser <simon.ser@intel.com>
2019-05-10meson: Use -D_FORTIFY_SOURCE=2 on optimized buildsArkadiusz Hiler
Some distribution enable _FORTIFY_SOURCE implicitly if user sets of -O1 greater in the CFLAGS, which may cause surprise compile failures. Let's fortify explicitly and for everyone with default build, since the checks provided are good. Cc: Eero Tamminen <eero.t.tamminen@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-05-10meson: Change the default build type to debugoptimizedArkadiusz Hiler
Similar as we had with autotools, enables some more compile checks. Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-05-10meson/cc: Disable memory-allocating builtinsArkadiusz Hiler
Disable the memory allocating builtins as they may cause unexpected behavior with our framework. They *may* get optimized out in favor of a register or stack variable, making them effectively local. Local variables do not play well with longjmp, which we use for fixtures and subtests. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-05-09meson: Explicitly require libcurl for chameliumArkadiusz Hiler
Chamelium uses xmlrpc client which: $ xmlrpc-c-config client --libs -L/usr/lib/x86_64-linux-gnu -lxmlrpc_client -lxmlrpc -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util -lcurl Debian/Ubuntu (and perhaps others) lack dependency on libcurl-dev: $ apt depends libxmlrpc-core-c3-dev Depends: libxmlrpc-core-c3 (= 1.33.14-4) Suggests: xmlrpc-api-utils $ apt depends libxmlrpc-core-c3 libxmlrpc-core-c3 Depends: libc6 (>= 2.14) Depends: libcurl3 (>= 7.16.2) Which causes: /usr/bin/ld: cannot find -lcurl collect2: error: ld returned 1 exit status [14/711] Compiling C object 'tests/59830eb@@kms_atomic@exe/kms_atomic.c.o'. ninja: build stopped: subcommand failed. Debian's `reportbug` was used to report this issue. Meanwhile we can explicitly ask for libcurl. Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-05-07meson: Don't allow building with NDEBUG, everLyude Paul
Following some discussion and confusion around whether or not assert() should be used, it seems the decision has come to "yes, sometimes". To quote Petri Latvala on the appropriate points to use assert() in lib/: However, it's the thought that matters, and this is slightly going off on a tangent. Those uses of assert in lib/ are for places where 1) something is fatally wrong and we need to drop everything and stop executing 2) cannot use igt_assert for it. That's for places where we can say "you tried testing your kernel but it has a bug". The lib/ asserts are for "IGT has a bug", or in a couple of cases, "your IGT setup has a bug". While we did come to the conclusion that we should possibly consider introducing a new API to check for bugs with igt (and prevent further testing if any are found), until then let's at least make sure that assert() always works where we expect it. So, accomplish this by raising an error if b_ndebug isn't set to 'false'. Additionally, run the compile check in lib/check-ndebug.h to make sure that the user does not have -DNDEBUG set in their CFLAGS, c_args options, etc. Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Lyude Paul <lyude@redhat.com>
2019-05-07meson: Don't redefine gettid if the C library provides itLyude Paul
glibc 2.30+ will actually include a definition for gettid() that makes it so that users don't have to manually define a wrapper for it themselves with syscall(). We don't currently check for this, and as a result will end up redefining gettid() on the latest versions of glibc, causing the build to fail: FAILED: lib/76b5a35@@igt-igt_kmod_c@sta/igt_kmod.c.o In file included from /usr/include/unistd.h:1170, from ../../mnt/vol/lib/igt_core.h:43, from ../../mnt/vol/lib/igt_kmod.c:28: /usr/include/bits/unistd_ext.h:34:28: error: macro "gettid" passed 1 arguments, but takes just 0 34 | extern __pid_t gettid (void) __THROW; | ^ In file included from ../../mnt/vol/lib/igt_kmod.c:27: ../../mnt/vol/lib/igt_aux.h:40: note: macro "gettid" defined here 40 | #define gettid() syscall(__NR_gettid) | [36/771] Compiling C object 'lib/76b5a35@@igt-igt_kms_c@sta/igt_kms.c.o'. ninja: build stopped: subcommand failed. So, fix this by by adding some meson checks to define HAVE_GETTID whenever the host defines its own gettid(), and avoid redefining gettid() when HAVE_GETTID is defined. This fixes build igt-gpu-tools for me on Fedora Rawhide Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Lyude Paul <lyude@redhat.com>
2019-04-25tests/kms_chamelium: add dp-audio testSimon Ser
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>
2019-02-28meson: Make doc building dependent on gtk-docArkadiusz Hiler
Currently, when gtk-doc is not installed 'ninja' succeeds but 'ninja install' fails with the following error: FileNotFoundError: [Errno 2] No such file or directory: 'gtkdoc-scan': 'gtkdoc-scan' With this patch 'meson build' will log that documentations would not build and 'ninja install' will succeed. When forcing building docs with 'meson -Dbuild_docs=true build' the following error will occur instead: meson.build:323:0: ERROR: Dependency "gtk-doc" not found, tried pkgconfig and cmake Cc: Petri Latvala <petri.latvala@intel.com> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-02-20meson: Bump meson version requirement to 0.46.0Arkadiusz Hiler
... so we can have multiple binaries with the same name. v2: Updated news (Daniel) Cc: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-02-13lib/igt_fb: Add support for P01x formats, v5.Maarten Lankhorst
The P01x formats are planar 16 bits per component, with the unused lower bits set to 0. This means they can all be converted the same way. Only the range is slightly different, and this is handled in the color_encoding implementation. This requires cairo 1.17.2 and pixman 0.36. This works but doesn't give extra precision. For more than 8 bits precision a few more patches are required to pixman, pending review: https://lists.freedesktop.org/archives/pixman/2019-January/004815.html https://lists.freedesktop.org/archives/pixman/2019-January/004809.html Once those are merged, we will require the next pixman release for better precision. Changes since v1: - Add fallback color definitions when compiling on cairo version < 1.17.2. - Skip when FB creation fails on HDR formats, instead of failing. Changes since v2: - Complain slightly harder when pixman/cairo are out of date. - Create a fb with alpha when converting to pixman formats with alpha. - Oops, s/pixman_format_code_t/cairo_format_t/ Changes since v3: - Rebase on top of upstream YUV changes. Changes since v4: - Rebase again. - Use drm_fourcc.h from drm-misc-next. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> #v4
2019-01-23tests: drop openssl dependency in favor of glib sha1 implementationJani Nikula
We already depend on glib which has sha1, so we don't really need openssl just for sha1. The opensll dependency was added in commit caea9c5b3aa1 ("igt/gem_userptr: Check read-only mappings"). Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2018-11-05meson: Enable more warning flagsPetri Latvala
We had quite a bit of warning flags active on autotools builds that were not used for meson builds. Add the same flags autotools builds used to what meson was using (some flags autotools didn't have). For the assembler, disable some of the flags to make it build cleanly again. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-10-31lib: Make libunwind optional againDaniel Vetter
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>
2018-10-08igt: Make pixman mandatoryMaxime Ripard
So far, pixman was used exclusively when the Chamelium support was enabled. However, since we're going to use it as one of the backend to do the igt_fb conversions between formats, we'll need it all the time. Make that explicit. Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-08-30lib/core: Use libdw to decode stack trace with debugging symbols, v2.Maarten Lankhorst
libdw is a new dependency built from the elfutils package. It provides us a way to generate line numbers and file names from the instruction pointer. elfutils is LGPLv3 or GPLv2, so it's ok to link against it. Before: IGT-Version: 1.23-g8ae86abd419d (x86_64) (Linux: 4.16.0-1-amd64 x86_64) Starting subtest: fail-result (meta_test:29661) CRITICAL: Test assertion failure function test_result, file ../tests/meta_test.c:94: (meta_test:29661) CRITICAL: Failed assertion: result == 1 (meta_test:29661) CRITICAL: error: 0 != 1 Stack trace: #0 [__igt_fail_assert+0x20a] #1 [test_result+0x7a] #2 [__real_main120+0x240] #3 [main+0x4a] #4 (../csu/libc-start.c) __libc_start_main:344 #5 [_start+0x2a] After: IGT-Version: 1.23-g8ae86abd419d (x86_64) (Linux: 4.16.0-1-amd64 x86_64) Starting subtest: fail-result (meta_test:1357) CRITICAL: Test assertion failure function test_result, file ../tests/meta_test.c:94: (meta_test:1357) CRITICAL: Failed assertion: result == 1 (meta_test:1357) CRITICAL: error: 0 != 1 Stack trace: #0 ../lib/igt_core.c:1467 __igt_fail_assert() #1 ../tests/meta_test.c:95 test_result() #2 ../tests/meta_test.c:137 __real_main120() #3 ../tests/meta_test.c:120 main() #4 ../csu/libc-start.c:344 __libc_start_main() #5 [_start+0x2a] Changes since v1: - Add libdw dependency to readme. - Change backtrace format slightly. Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Add description about libdw in commit msg, name -> dwfl_name] Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-08-13meson: Define all the rpath_dirs in one placeArkadiusz Hiler
So they are located close to the definitions of the corresponding install_dirs and can be reused easily. Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-08-09runner: New test runnerPetri Latvala
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>
2018-08-08meson: Downgrade meson version requirement a notchPetri Latvala
0.44.0 is a fine version. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
2018-07-25build: provide stub implementation for memfd_createLucas De Marchi
When libc misses memfd_create(), provide a stub implementation to go through the syscall() route. Syscall numbers are provided for platforms currently supported by i-g-t only. v2: add support to autotools Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2018-07-25build: provide include for missing syscallsLucas De Marchi
Add directory with README file to allow missing syscalls to be defined. The syscalls themselves will be provided in follow up patches. v2: add support to autotools Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2018-07-18Update NEWS, bump version to 1.23.Arkadiusz Hiler
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2018-07-13igt/gem_userptr: Check read-only mappingsChris Wilson
Setup a userptr object that only has a read-only mapping back to a file store (memfd). Then attempt to write into that mapping using the GPU and assert that those writes do not land (while also writing via a writable userptr mapping into the same memfd to verify that the GPU is working!) v2: Pull the random batch construction into a routine to avoid duplication. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-07-12build: bump c std to gnu11Lucas De Marchi
It's been a long time and all reasonable toolchains support gnu11 already. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-06-25meson: Add options to control optional partsPetri Latvala
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>
2018-06-25Make GLib mandatoryPetri Latvala
GLib was originally made optional for Android builds, and Android support was dropped a while ago due to lack of use and maintenance. Building without GLib was broken without bug reports anyway. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-05-16igt: Drop Intel from the name in docs and pathsArkadiusz Hiler
This is just a simple change to reflect the actual state. No rewording yet, just a simple substitution in most visible places - docs, README and paths. There are probably some leftovers here and there, but we can let them be for now, this is already well overdue. v2: fixed couple of obvious leftovers pointed out by Petri Cc: Petri Latvala <petri.latvala@intel.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-03-23meson: Chamelium depends on GSLDaniel Stone
Chamelium support requires igt_frame to be built, which requires both GSL and Pixman. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-03-09Update NEWS, bump version to 1.22.Petri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-03-09meson: Force libdrm version also for the subpackagesArkadiusz Hiler
libdrm_intel, libdrm_nouveau and libdrm_amdgpu were accepted in any version, which caused problems (missing symbols) with more than one libdrm present, (e.g. local one for testing and a system-wide one provided by the distribution). Let's enforce the version everywhere. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-02-27igt: Make libudev mandatoryAntonio Argenziano
Since more essential components use libudev, make its dependency mandatory. Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Petri Latvala <petri.latvala@intel.com>
2018-02-26meson: Don't build docs when cross-compilingPetri Latvala
Building documentation requires executing all test binaries to produce their respective description texts. This can be a very time-consuming process, if viable at all, when the target arch differs from the host. Don't process the doc directory at all when an exe wrapper is setup. This avoids the runtime penalty when the target binaries are executed through qemu, but leaves everything as-is when the target binaries can be directly executed, like when cross-compiling to x86 from x86_64 host. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>