bpftool: Use feature list in bash completion
authorQuentin Monnet <quentin@isovalent.com>
Wed, 29 Jun 2022 20:36:37 +0000 (21:36 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 30 Jun 2022 14:17:06 +0000 (16:17 +0200)
commit6d304871e3ef4c339c06aa9b4ab55b6c77642884
tree5c9274f8e77b9b7fddefb55db1db9f05c051c143
parent27b3f70553432114b3d26f4d9c72cf02f38b84ee
bpftool: Use feature list in bash completion

Now that bpftool is able to produce a list of known program, map, attach
types, let's use as much of this as we can in the bash completion file,
so that we don't have to expand the list each time a new type is added
to the kernel.

Also update the relevant test script to remove some checks that are no
longer needed.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Daniel Müller <deso@posteo.net>
Link: https://lore.kernel.org/bpf/20220629203637.138944-3-quentin@isovalent.com
tools/bpf/bpftool/bash-completion/bpftool
tools/testing/selftests/bpf/test_bpftool_synctypes.py