]> git.baikalelectronics.ru Git - kernel.git/commit
selftests, bpf: Make docs tests fail more reliably
authorJoe Stringer <joe@cilium.io>
Tue, 8 Jun 2021 01:57:56 +0000 (18:57 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 8 Jun 2021 20:04:35 +0000 (22:04 +0200)
commit08261bf4a73737f6738525cb6c38caa2db541beb
tree09e047c0d3e859eda48cd3eb9ec2ba2146c8ea92
parent74b8540e69de594144493f8ce39ce3ff05a0acf2
selftests, bpf: Make docs tests fail more reliably

Previously, if rst2man caught errors, then these would be ignored and
the output file would be written anyway. This would allow developers to
introduce regressions in the docs comments in the BPF headers.

Additionally, even if you instruct rst2man to fail out, it will still
write out to the destination target file, so if you ran the tests twice
in a row it would always pass. Use a temporary file for the initial run
to ensure that if rst2man fails out under "--strict" mode, subsequent
runs will not automatically pass.

Tested via ./tools/testing/selftests/bpf/test_doc_build.sh

Signed-off-by: Joe Stringer <joe@cilium.io>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20210608015756.340385-1-joe@cilium.io
tools/testing/selftests/bpf/.gitignore
tools/testing/selftests/bpf/Makefile.docs
tools/testing/selftests/bpf/test_doc_build.sh