1. 25 Jul, 2018 1 commit
    • Peter Hutterer's avatar
      test: supress another bash warning · 7165a62e
      Peter Hutterer authored
      Failing the leftover-rules check in the valgrind stage because
      ==1491== Invalid read of size 16
      ==1491==    at 0x5320AE8: __wcsnlen_sse4_1 (in /usr/lib64/libc-2.27.so)
      ==1491==    by 0x5310AD1: wcsrtombs (in /usr/lib64/libc-2.27.so)
      ==1491==    by 0x1AA403: ??? (in /usr/bin/bash)
      ==1491==    by 0x1AB3E3: glob_filename (in /usr/bin/bash)
      ==1491==    by 0x179FF1: shell_glob_filename (in /usr/bin/bash)
      ==1491==    by 0x1752CD: ??? (in /usr/bin/bash)
      ==1491==    by 0x14C05F: ??? (in /usr/bin/bash)
      ==1491==    by 0x14E2E3: execute_command_internal (in /usr/bin/bash)
      ==1491==    by 0x14FBC5: execute_command (in /usr/bin/bash)
      ==1491==    by 0x137598: reader_loop (in /usr/bin/bash)
      ==1491==    by 0x135D38: main (in /usr/bin/bash)
      ==1491==  Address 0x5651fd0 is 32 bytes before a block of size 128 in arena "client"
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
  2. 23 Mar, 2018 1 commit
  3. 24 Jul, 2017 1 commit
  4. 08 May, 2017 1 commit
  5. 18 May, 2015 1 commit
    • Peter Hutterer's avatar
      test: add a backtrace facility to litest · 84e6321f
      Peter Hutterer authored
      The check unit test framework isn't particularly suited to having ck_assert*
      calls in helper functions. A failed assertion in a helper function or the
      litest framework merely gives us a the failed line in litest.c.
      which doesn't tell us which test actually failed.
      Add a backtracing facility with litest_backtrace(). And since this requires
      wrapping all ck_assert macros with litest_assert() this patch ended up
      replacing/duplicating a bunch of ck_assert_* bits. So rather than
      ck_assert_int_eq() we now use litest_assert_int_eq(), etc. in the litest
      framework itself.
      The int comparison macros are more type-safe than ck_assert()'s macros which
      just cast all the ints to intmax_t.
      Backtrace is spewed to stderr, which is good enough for debugging. Example
      	FAILED COMPARISON: status != expected
      	Resolved to: 0 != 0
      	in disable_button_scrolling() (pointer.c:115)
      	0: ./test/test-pointer (litest_fail_comparison_int+0xab) [0x40973b]
      	1: ./test/test-pointer (disable_button_scrolling+0x174) [0x40421b]
      	2: ./test/test-pointer (middlebutton_middleclick+0x40) [0x40829c]
      	3: /lib64/libcheck.so.0 (srunner_run+0x7f5) [0x7f0e8a277025]
      	4: ./test/test-pointer (litest_run+0x107) [0x40a42b]
      	5: ./test/test-pointer (main+0x2fa) [0x4090e7]
      	6: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7f0e88f5e790]
      	7: ./test/test-pointer (_start+0x29) [0x403ce9]
      	8: ? (?+0x29) [0x29]
      litest_backtrace() itself is copied from xserver/os/backtrace.c which git
      blame attributes to Marcin.
      CC:  Marcin Slusarz <marcin.slusarz@gmail.com>
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
  6. 02 Mar, 2015 2 commits
  7. 10 Apr, 2014 1 commit