[LTP] [PATCH v2 1/2] Add TST_ASSERT_SYSCALL*() macros

Cyril Hrubis chrubis@suse.cz
Thu Mar 5 18:53:25 CET 2020


Hi!
> What I like on these macros (besides DRY) is that it really shows the test, not
> the library, see
> before:
> tst_safe_timerfd.c:21: BROK: timerfd01.c:89 timerfd_create(CLOCK_MONOTONIC) failed: EINVAL (22)
> after:
> timerfd01.c:89: BROK: timerfd_create(CLOCK_MONOTONIC) failed: EINVAL (22)

That's because it calls tst_brk_() correctly instead of tst_brk(). I
should have caught that during the review.

Also given the way it's structured now we can pass these parameters to a
shell script as well and generate the end result easily. With a bit more
work we can generate both header and C source as well and would still
prefer that over these macros.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list