[LTP] [RFC PATCH 2/2] include/tst_test_macros.h: Report TINFO when TST_EXP_FD() succeeded

yangx.jy yangx.jy@cn.fujitsu.com
Tue Jan 5 15:39:00 CET 2021


On 2021/1/5 21:36, Cyril Hrubis wrote:
> Hi!
>> In Summary output, avoid counting the double passed for one test:
>> -------------------------------------
>> ./open01
>> tst_test.c:1261: TINFO: Timeout per run is 0h 05m 00s
>> open01.c:48: TPASS: open() with sticky bit returned fd 3
>> open01.c:59: TPASS: sticky bit is set as expected
>> open01.c:48: TPASS: open() with sirectory bit returned fd 3
>> open01.c:59: TPASS: sirectory bit is set as expected
>>
>> Summary:
>> passed   4
>> failed   0
>> broken   0
>> skipped  0
>> warnings 0
>> -------------------------------------
> What exactly is the problem of having TPASS generated for each open()
> that produces a valid file descriptor in the open testcases?
>
> These macros are especially tailored to generate TPASS/TFAIL messages so
> that the caller does not have to. So even if having two TPASS per run()
> function in open01 was a problem, which I do not think is the case, we
> should just use SAFE_OPEN() there instead.
Hi Cyril,

I perfer to report one TPASS message when finishing one subtest instead 
of one step.
     because of two reasons:
    a) It seems clearer for user to know how many subtests were run 
sucessfully.
    b) There are too many TPASS/TFAIL messages when a testcase(e.g. 
open11) contains many subtests or multiple TST_EXP_* macros.
Could we make TST_EXP_* macros do common check and generate only TFAIL 
messages? (Make testcases report TPASS message by themself)

Best Regards,
Xiao Yang





More information about the ltp mailing list