Re: Use of kernel tools/testing/selftests ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/13/2017 12:30 PM, Jesper Dangaard Brouer wrote:
Hi Fengguang and Daniel,

I'm looking into adding some tests for tools/testing/selftests/bpf/.
I'm a bit confused about the output format, as it seems to differ even
among programs in the same directory (tools/testing/selftests/bpf/).

I do see, that tools/testing/selftests/lib.mk have a standard output
format via the program shell exit-code (copied Makefile syntax):

  exit_code && echo "selftests: $$BASENAME_TEST [PASS]" \
            || echo "selftests:  $$BASENAME_TEST [FAIL]"

To Fengguang:
How do your kbuild-robot hook into this?
  (1) Do you parse/grep after output? (egrep -e "^selftests: .* \[.*\]")
  (2) Or do you rely on the shell exit codes?

A quick look at some of the bpf tests, show that they are not all using
the exit codes to indicate failure (... which I guess is a bug we
should fix?)

Yep, if you have a chance please send a fix (otherwise I can also take
care of it). The way test_verifier handles it wrt exit code is correct,
and other tests should follow the same model. Thanks for spotting!

p.s. I have noticed: Documentation/kselftest.txt, but it says nothing
about output format used/required program exit codes.
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux