linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] selftests/bpf: make test_doc_build.sh work from script directory
@ 2021-08-19  7:24 Li Zhijian
  2021-08-19  7:24 ` [PATCH 2/3] selftests/bpf: add default bpftool built by selftests to PATH Li Zhijian
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Li Zhijian @ 2021-08-19  7:24 UTC (permalink / raw)
  To: shuah, linux-kselftest, netdev, bpf
  Cc: ast, daniel, andrii, kafai, songliubraving, yhs, kpsingh,
	linux-kernel, philip.li, yifeix.zhu, Li Zhijian,
	kernel test robot

Previously, it fails as below:
-------------
root@lkp-skl-d01 /opt/rootfs/v5.14-rc4/tools/testing/selftests/bpf# ./test_doc_build.sh
++ realpath --relative-to=/opt/rootfs/v5.14-rc4/tools/testing/selftests/bpf ./test_doc_build.sh
+ SCRIPT_REL_PATH=test_doc_build.sh
++ dirname test_doc_build.sh
+ SCRIPT_REL_DIR=.
++ realpath /opt/rootfs/v5.14-rc4/tools/testing/selftests/bpf/./../../../../
+ KDIR_ROOT_DIR=/opt/rootfs/v5.14-rc4
+ cd /opt/rootfs/v5.14-rc4
+ for tgt in docs docs-clean
+ make -s -C /opt/rootfs/v5.14-rc4/. docs
make: *** No rule to make target 'docs'.  Stop.
+ for tgt in docs docs-clean
+ make -s -C /opt/rootfs/v5.14-rc4/. docs-clean
make: *** No rule to make target 'docs-clean'.  Stop.
-----------

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
---
 tools/testing/selftests/bpf/test_doc_build.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/bpf/test_doc_build.sh b/tools/testing/selftests/bpf/test_doc_build.sh
index ed12111cd2f0..d67ced95a6cf 100755
--- a/tools/testing/selftests/bpf/test_doc_build.sh
+++ b/tools/testing/selftests/bpf/test_doc_build.sh
@@ -4,9 +4,10 @@ set -e
 
 # Assume script is located under tools/testing/selftests/bpf/. We want to start
 # build attempts from the top of kernel repository.
-SCRIPT_REL_PATH=$(realpath --relative-to=$PWD $0)
+SCRIPT_REL_PATH=$(realpath $0)
 SCRIPT_REL_DIR=$(dirname $SCRIPT_REL_PATH)
-KDIR_ROOT_DIR=$(realpath $PWD/$SCRIPT_REL_DIR/../../../../)
+KDIR_ROOT_DIR=$(realpath $SCRIPT_REL_DIR/../../../../)
+SCRIPT_REL_DIR=$(dirname $(realpath --relative-to=$KDIR_ROOT_DIR $SCRIPT_REL_PATH))
 cd $KDIR_ROOT_DIR
 
 for tgt in docs docs-clean; do
-- 
2.32.0




^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-20  2:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 3/3] selftests/bpf: add missing files required by test_bpftool.sh for installing Li Zhijian
2021-08-19 22:16   ` 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

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).