[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191119105010.19189-3-quentin.monnet@netronome.com>
Date: Tue, 19 Nov 2019 10:50:10 +0000
From: Quentin Monnet <quentin.monnet@...ronome.com>
To: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org,
oss-drivers@...ronome.com,
Quentin Monnet <quentin.monnet@...ronome.com>,
Naresh Kamboju <naresh.kamboju@...aro.org>,
Jakub Kicinski <jakub.kicinski@...ronome.com>
Subject: [PATCH bpf-next 2/2] selftests: bpftool: skip the build test if not in tree
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
If selftests are copied over to another machine/location
for execution the build test of bpftool will obviously
not work, since the sources are not copied.
Skip it if we can't find bpftool's Makefile.
Reported-by: Naresh Kamboju <naresh.kamboju@...aro.org>
Signed-off-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
Signed-off-by: Quentin Monnet <quentin.monnet@...ronome.com>
---
tools/testing/selftests/bpf/test_bpftool_build.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/bpf/test_bpftool_build.sh b/tools/testing/selftests/bpf/test_bpftool_build.sh
index 1fc6f6247f9b..ac349a5cea7e 100755
--- a/tools/testing/selftests/bpf/test_bpftool_build.sh
+++ b/tools/testing/selftests/bpf/test_bpftool_build.sh
@@ -20,6 +20,10 @@ SCRIPT_REL_PATH=$(realpath --relative-to=$PWD $0)
SCRIPT_REL_DIR=$(dirname $SCRIPT_REL_PATH)
KDIR_ROOT_DIR=$(realpath $PWD/$SCRIPT_REL_DIR/../../../../)
cd $KDIR_ROOT_DIR
+if [ ! -e tools/bpf/bpftool/Makefile ]; then
+ echo -e "skip: bpftool files not found!\n"
+ exit 0
+fi
ERROR=0
TMPDIR=
--
2.17.1
Powered by blists - more mailing lists