You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some selftests are executing a lot of different subtests. On the other
hand, the kselftests infrastructure only supports TAP 13 format, which
doesn't support subtests.
If one subtest fails, the whole selftest is marked as failed. It starts
to be really annoying when one subtest starts to be unstable and marked
as "ignored": all the other subtests are then ignored as well. It is
then important to parse subtests to be able to track each subtest
individually, and not loose info about the others when one is unstable.
A workaround to support subtests with TAP 13 is to embed the subtests
result in the comments. This is what is done with MPTCP selftests.
That's not specific to MPTCP, because TC and others written in C and
using kselftest_harness.h are also doing that. The output to parse looks
like that:
TAP version 13
1..1
# timeout set to (...)
# selftests: (...)
# <comment>
# (...)
# <comment>
#
# TAP version 13 |
# 1..X |
# ok 1 (...) |
# nok 2 (...) | <== That's what we want to parse
# ok 3 (...) # SKIP |
# (...) |
# ok X (...) |
ok 1 selftests: {target}: {prog}
The last line is not parsed, this is handled by the existing code, also
checking for VM crash, etc. This means that in case of crash, the
kselftest will be marked as 'fail', but subtests (if any) will be
parsed: the ones previous to the crash are still valid. It might help to
know what was OK, and what was not.
Because it will increase the number of tests, there is a new option,
disabled by default, to enable this feature or not per target, where it
makes sense:
[ksft]
nested_tests = on
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
0 commit comments