On 09/09/2020 17:45, Andrii Nakryiko wrote: > On Wed, Sep 9, 2020 at 9:22 AM Quentin Monnet <quentin@xxxxxxxxxxxxx> wrote: >> >> eBPF selftests include a script to check that bpftool builds correctly >> with different command lines. Let's add one build for bpftool's >> documentation so as to detect errors or warning reported by rst2man when >> compiling the man pages. Also add a build to the selftests Makefile to >> make sure we build bpftool documentation along with bpftool when >> building the selftests. >> >> This also builds and checks warnings for the man page for eBPF helpers, >> which is built along bpftool's documentation. >> >> This change adds rst2man as a dependency for selftests (it comes with >> Python's "docutils"). >> >> v2: >> - Use "--exit-status=1" option for rst2man instead of counting lines >> from stderr. > > It's a sane default to have non-zero exit code on error/warning, so > why not specifying it all the time? I hesitated to do so. I held off because a non-zero exit stops man pages generation (rst2man does pursue the creation of the current man page unless the error level is too high, but the Makefile will exit and not produce the following man pages). This sounds desirable for developers, but if distributions automatically build the doc to package it, I thought it would be better to carry on and build the other man pages rather than stopping the whole process. But I can change it as a follow-up if you think it would be best. Quentin