Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf: detect build errors for man pages for bpftool and eBPF helpers #16

Closed
wants to merge 3 commits into from

Commits on Sep 9, 2020

  1. adding ci files

    kernel-patches-bot committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    746102b View commit details
    Browse the repository at this point in the history
  2. To build man pages for bpftool (and for eBPF helper functions), rst2man

    can log different levels of information. Let's make it log all levels
    to keep the RST files clean.
    
    Doing so, rst2man complains about double colons, used for literal
    blocks, that look like underlines for section titles. Let's add the
    necessary blank lines.
    
    v2:
    - Use "--verbose" instead of "-r 1" (same behaviour but more readable).
    - Pass it through a RST2MAN_OPTS variable so we can easily pass other
      options too.
    
    Signed-off-by: Quentin Monnet <quentin@isovalent.com>
    Acked-by: Andrii Nakryiko <andriin@fb.com>
    ---
     tools/bpf/bpftool/Documentation/Makefile        | 3 ++-
     tools/bpf/bpftool/Documentation/bpftool-btf.rst | 3 +++
     tools/bpf/bpftool/Documentation/bpftool-gen.rst | 4 ++++
     tools/bpf/bpftool/Documentation/bpftool-map.rst | 3 +++
     4 files changed, 12 insertions(+), 1 deletion(-)
    qmonnet authored and kernel-patches-bot committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    79ac1b7 View commit details
    Browse the repository at this point in the history
  3. 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.
    - Also build bpftool as part as the selftests build (and not only when
      the tests are actually run).
    
    Signed-off-by: Quentin Monnet <quentin@isovalent.com>
    ---
     tools/testing/selftests/bpf/Makefile          |  5 +++++
     .../selftests/bpf/test_bpftool_build.sh       | 21 +++++++++++++++++++
     2 files changed, 26 insertions(+)
    qmonnet authored and kernel-patches-bot committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    c70da8d View commit details
    Browse the repository at this point in the history