[LTP] Question about log format.

Richard Palethorpe rpalethorpe@suse.de
Mon Dec 12 15:36:55 CET 2022


Hello,

Xinkuan Yan <lucky33newman@gmail.com> writes:

> Hello list,
>
> I'm trying to do a concise parsing of the LTP report.
>
> I don't have much experience and I'm not familiar with LTP, so I'm going to
> take #math as an example, for it is not complex.
>
> Run test command:
>
> ./ltp –f math –q
>
> I have three questions now,  taking the one-line output result below as an
> example:
>
> float_iperb 1 TPASS: Test passed

This is a test using the old API, so not the best example.

>
> 1, It is clear that TPASS means it passed, but what is the number 1
> standing for.

I don't know to be honest. It was removed in the new test API.

>
> 2, Why this line showed up twice? ( PS: Between these two lines are many
> TINFO.)

Possibly because there are multiple iterations of the test. Possibly
some paramters are changed between iterations.

Only way to find out is to look for tst_resm calls in the source code.

>
> 3, Where to check those out put standards, taking yocto package test as a
> small comprehension, that standard was ( PASS|FAIL|SKIP): Test info. How is
> it like in LTP?

https://github.com/linux-test-project/ltp/wiki/C-Test-API#12-basic-test-interface

Note taht the new API output looks more like the following:

sh-5.2# ./bpf_prog07
tst_buffers.c:55: TINFO: Test is using guarded buffers
tst_taint.c:116: TCONF: Ignoring already set kernel warning taint
tst_test.c:1560: TINFO: Timeout per run is 0h 00m 30s
bpf_common.c:17: TINFO: Raising RLIMIT_MEMLOCK to 10485760
tst_capability.c:29: TINFO: Dropping CAP_SYS_ADMIN(21)
tst_capability.c:29: TINFO: Dropping CAP_BPF(39)
bpf_common.c:39: TCONF: Hint: check also /proc/sys/kernel/unprivileged_bpf_disabled
bpf_common.c:41: TCONF: bpf() requires CAP_SYS_ADMIN or CAP_BPF on this system: EPERM (1)

Summary:
passed   0
failed   0
broken   0
skipped  3
warnings 0

sh-5.2# ./bpf_prog01
tst_buffers.c:55: TINFO: Test is using guarded buffers
tst_test.c:1560: TINFO: Timeout per run is 0h 00m 30s
bpf_common.c:17: TINFO: Raising RLIMIT_MEMLOCK to 10485760
bpf_common.c:114: TPASS: Loaded program
bpf_prog01.c:95: TPASS: val = 1
...

So the format is like:

<file_name>:<line>: <ttype>: <message>

-- 
Thank you,
Richard.


More information about the ltp mailing list