Skip to content
  1. Apr 16, 2019
    • Lyude Paul's avatar
      Gitlab CI: Do builds with -Db_ndebug=true · b359624f
      Lyude Paul authored
      
      
      To make sure that no one ever uses assert() in the wrong places again,
      let's build with -Db_ndebug=true so that assert() gets compiled out.
      
      Signed-off-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
      b359624f
    • Lyude Paul's avatar
      Update Dockerfile.fedora to Fedora 29 · 27c56302
      Lyude Paul authored
      Latest stable release of Fedora
      27c56302
    • Lyude Paul's avatar
      lib: Stop using assert() for runtime checks · ab8b3a8b
      Lyude Paul authored
      
      
      In the process of trying to get an up to date version of igt packaged
      for Fedora I discovered that if igt was built with -Db_ndebug=true, a
      significant portion of the test infrastructure unit tests would start
      failing:
      
        1/265 lib: igt_assert                         OK       0.11 s
        2/265 lib: igt_can_fail                       OK       0.08 s
        3/265 lib: igt_can_fail_simple                OK       0.08 s
        4/265 lib: igt_exit_handler                   OK       0.05 s
        5/265 lib: igt_fork                           FAIL     0.05 s (killed by signal 9 SIGKILL)
        6/265 lib: igt_fork_helper                    OK       0.42 s
        7/265 lib: igt_hdmi_inject                    OK       0.05 s
        8/265 lib: igt_list_only                      OK       0.01 s
        9/265 lib: igt_invalid_subtest_name           OK       0.05 s
       10/265 lib: igt_no_exit                        OK       0.04 s
       11/265 lib: igt_segfault                       OK       0.38 s
       12/265 lib: igt_simulation                     OK       0.02 s
       13/265 lib: igt_stats                          OK       0.04 s
       14/265 lib: igt_subtest_group                  OK       0.03 s
       15/265 lib: igt_no_subtest                     SKIP     0.02 s
       16/265 lib: igt_simple_test_subtests           UNEXPECTEDPASS 0.02 s
       17/265 lib: igt_timeout                        EXPECTEDFAIL 1.02 s
      
      Which appeared to stem from the fact that -Db_ndebug=true would strip
      assert() calls. While on a first glance of lib/tests/igt_tests_common.h
      one would assume that the only user of assert() was the test
      infrastructure unit tests themselves, it turns out we've actually been
      using this in multiple spots that seem to expect an unconditional
      runtime check.
      
      So in order to fix this, we introduce igt_internal_assert(). The purpose
      of this function is to provide simple runtime error-checking for
      conditions that warrant abort()ing IGT under any circumstances, and to
      provide a internal_assert() replacement for our test infrastructure
      tests to use. Then, remove all of the assert() usages in lib/tests/*
      along with any of the assert() calls in lib/igt_core.c that affect test
      behavior.
      
      Signed-off-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
      ab8b3a8b
    • Lyude Paul's avatar
      meson: Don't redefine gettid if the C library provides it · 43b3220d
      Lyude Paul authored
      
      
      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 intel-gpu-tools for me on Fedora Rawhide
      
      Signed-off-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
      43b3220d
    • Lyude Paul's avatar
      lib/tests: Fix test failures with meson 0.50.0 · 15fe786c
      Lyude Paul authored
      
      
      Since meson 0.50.0, unit tests which return the GNU standard return code
      99 will fail, regardless of whether or not should_fail:true is passed to
      test(). Unfortunately, igt_alarm_handler() exits the application with
      return code 99. However, since returning something other then 99 when a
      test times out would also be a bug we can't really change the return
      code igt_alarm_handler() returns.
      
      Instead, we can fix this by simply running tests which are expected to
      fail with return code 99 using a wrapper script that translates 99 to 1
      and any other non-zero error code into 99. This essentially makes it so
      that abnormal test failures are considered normal, and vice versa.
      
      Signed-off-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
      15fe786c
    • Lyude Paul's avatar
      Use pkgconfig() macros with dnf in Fedora Dockerfile · 594d8bec
      Lyude Paul authored
      dnf supports installing packages by their pkgconfig names using the
      pkgconfig() RPM macro. Since these more closely match the dependencies
      that meson uses and don't have a chance of changing in the future like
      Fedora package name do, let's use these with dnf instead.
      594d8bec
  2. Apr 12, 2019
  3. Apr 11, 2019
  4. Apr 10, 2019
  5. Apr 09, 2019
  6. Apr 08, 2019
  7. Apr 05, 2019
  8. Apr 04, 2019
  9. Apr 03, 2019
Loading