LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Li Zhijian <lizhijian@cn.fujitsu.com>
To: <shuah@kernel.org>, <linux-kselftest@vger.kernel.org>,
	<netdev@vger.kernel.org>, <bpf@vger.kernel.org>
Cc: <ast@kernel.org>, <daniel@iogearbox.net>, <andrii@kernel.org>,
	<kafai@fb.com>, <songliubraving@fb.com>, <yhs@fb.com>,
	<kpsingh@kernel.org>, <linux-kernel@vger.kernel.org>,
	<philip.li@intel.com>, <yifeix.zhu@intel.com>,
	Li Zhijian <lizhijian@cn.fujitsu.com>
Subject: [PATCH 3/3] selftests/bpf: add missing files required by test_bpftool.sh for installing
Date: Thu, 19 Aug 2021 15:24:31 +0800	[thread overview]
Message-ID: <20210819072431.21966-3-lizhijian@cn.fujitsu.com> (raw)
In-Reply-To: <20210819072431.21966-1-lizhijian@cn.fujitsu.com>

- 'make install' will install bpftool to INSTALL_PATH/bpf/bpftool
- add INSTALL_PATH/bpf to PATH

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
---
 tools/testing/selftests/bpf/Makefile        | 4 +++-
 tools/testing/selftests/bpf/test_bpftool.sh | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index f405b20c1e6c..c6ca1b8e33d5 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -85,7 +85,7 @@ TEST_PROGS_EXTENDED := with_addr.sh \
 TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \
 	flow_dissector_load test_flow_dissector test_tcp_check_syncookie_user \
 	test_lirc_mode2_user xdping test_cpp runqslower bench bpf_testmod.ko \
-	xdpxceiver xdp_redirect_multi
+	xdpxceiver xdp_redirect_multi test_bpftool.py
 
 TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read
 
@@ -187,6 +187,8 @@ $(OUTPUT)/runqslower: $(BPFOBJ) | $(DEFAULT_BPFTOOL)
 		    BPFOBJ=$(BPFOBJ) BPF_INCLUDE=$(INCLUDE_DIR) &&	\
 		    cp $(SCRATCH_DIR)/runqslower $@
 
+TEST_GEN_PROGS_EXTENDED += $(DEFAULT_BPFTOOL)
+
 $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): $(OUTPUT)/test_stub.o $(BPFOBJ)
 
 $(OUTPUT)/test_dev_cgroup: cgroup_helpers.c
diff --git a/tools/testing/selftests/bpf/test_bpftool.sh b/tools/testing/selftests/bpf/test_bpftool.sh
index 6b7ba19be1d0..50cf9d3645d2 100755
--- a/tools/testing/selftests/bpf/test_bpftool.sh
+++ b/tools/testing/selftests/bpf/test_bpftool.sh
@@ -2,9 +2,10 @@
 # SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2020 SUSE LLC.
 
+# 'make -C tools/testing/selftests/bpf install' will install to SCRIPT_PATH
 SCRIPT_DIR=$(dirname $(realpath $0))
 
 # 'make -C tools/testing/selftests/bpf' will install to BPFTOOL_INSTALL_PATH
 BPFTOOL_INSTALL_PATH="$SCRIPT_DIR"/tools/sbin
-export PATH=$BPFTOOL_INSTALL_PATH:$PATH
+export PATH=$SCRIPT_DIR:$BPFTOOL_INSTALL_PATH:$PATH
 python3 -m unittest -v test_bpftool.TestBpftool
-- 
2.32.0




  parent reply	other threads:[~2021-08-19  7:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19  7:24 [PATCH 1/3] selftests/bpf: make test_doc_build.sh work from script directory Li Zhijian
2021-08-19  7:24 ` [PATCH 2/3] selftests/bpf: add default bpftool built by selftests to PATH Li Zhijian
2021-08-19 22:13   ` Song Liu
2021-08-19  7:24 ` Li Zhijian [this message]
2021-08-19 22:16   ` [PATCH 3/3] selftests/bpf: add missing files required by test_bpftool.sh for installing Song Liu
2021-08-20  2:02     ` lizhijian
2021-08-19 22:08 ` [PATCH 1/3] selftests/bpf: make test_doc_build.sh work from script directory Song Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210819072431.21966-3-lizhijian@cn.fujitsu.com \
    --to=lizhijian@cn.fujitsu.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=philip.li@intel.com \
    --cc=shuah@kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    --cc=yifeix.zhu@intel.com \
    --subject='Re: [PATCH 3/3] selftests/bpf: add missing files required by test_bpftool.sh for installing' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).