summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWentao Zhang <wentao.zhang@windriver.com>2023-12-18 08:46:29 +0000
committerKhem Raj <raj.khem@gmail.com>2023-12-21 14:26:16 -0800
commitca6c714d4a807f199db009bf4be293640623d7af (patch)
tree704c7875f9e1faee4e515cf003b078e75d270a38
parentabdfcf797483e9751523c3b9bc406269daa64d95 (diff)
downloadmeta-clang-ca6c714d4a807f199db009bf4be293640623d7af.tar.gz
bpftrace: Replace python with python3 in ptest
"runtime:call" in ptest gets the following FAILED: | python: No such file or directory Replace python with python3 in this ptest item. Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
-rw-r--r--dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0001-replace-python-with-python3-in-the-test.patch53
-rw-r--r--dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.17.0.bb1
2 files changed, 54 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0001-replace-python-with-python3-in-the-test.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0001-replace-python-with-python3-in-the-test.patch
new file mode 100644
index 0000000..6a82a1f
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace/0001-replace-python-with-python3-in-the-test.patch
@@ -0,0 +1,53 @@
1From f2a61d19d8432a220184c4eed7c39eb042d0dfff Mon Sep 17 00:00:00 2001
2From: Wentao Zhang <wentao.zhang@windriver.com>
3Date: Tue, 15 Aug 2023 11:18:36 +0800
4Subject: [PATCH] replace python with python3 in the test
5
6"runtime:call" in ptest gets the following FAILED:
7python: No such file or directory
8replace python with python3 in the test scripts.
9
10$export BPFTRACE_RUNTIME_TEST_EXECUTABLE=/usr/bin
11$cd /usr/lib/bpftrace/ptest/tests
12$python3 runtime/engine/main.py --filter="call.*"
13***
14[ RUN ] call.strftime_microsecond_extension_rollover
15[ FAILED ] call.strftime_microsecond_extension_rollover
16 Command: /usr/bin/bpftrace -e 'BEGIN { printf("%s - %s\n", strftime
17 ("1%f", 1000000123000), strftime("1%f", 0)); exit(); }' | tail -n
18 +2 | xargs -I{} python -c "print({})"
19 Unclean exit code: 127
20 Output: __BPFTRACE_NOTIFY_PROBES_ATTACHED\nxargs: python: No such
21 file or directory\n
22***
23
24Upstream-Status: Inappropriate [oe specific]
25
26Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
27---
28 tests/runtime/call | 4 ++--
29 1 file changed, 2 insertions(+), 2 deletions(-)
30
31diff --git a/tests/runtime/call b/tests/runtime/call
32index 36f5d9af..3a938f49 100644
33--- a/tests/runtime/call
34+++ b/tests/runtime/call
35@@ -294,13 +294,13 @@ TIMEOUT 5
36 #
37 # Note we add a `1` before the timestamp b/c leading zeros (eg `0123`) is invalid integer in python.
38 NAME strftime_microsecond_extension
39-RUN {{BPFTRACE}} -e 'BEGIN { printf("%s - %s\n", strftime("1%f", 1000123000), strftime("1%f", 0)); exit(); }' | tail -n +2 | xargs -I{} python -c "print({})"
40+RUN {{BPFTRACE}} -e 'BEGIN { printf("%s - %s\n", strftime("1%f", 1000123000), strftime("1%f", 0)); exit(); }' | tail -n +2 | xargs -I{} python3 -c "print({})"
41 EXPECT 123
42 TIMEOUT 1
43
44 # Similar to above test but test that rolling over past 1s works as expected
45 NAME strftime_microsecond_extension_rollover
46-RUN {{BPFTRACE}} -e 'BEGIN { printf("%s - %s\n", strftime("1%f", 1000000123000), strftime("1%f", 0)); exit(); }' | tail -n +2 | xargs -I{} python -c "print({})"
47+RUN {{BPFTRACE}} -e 'BEGIN { printf("%s - %s\n", strftime("1%f", 1000000123000), strftime("1%f", 0)); exit(); }' | tail -n +2 | xargs -I{} python3 -c "print({})"
48 EXPECT 123
49 TIMEOUT 1
50
51--
522.25.1
53
diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.17.0.bb b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.17.0.bb
index ca97683..920896e 100644
--- a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.17.0.bb
+++ b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.17.0.bb
@@ -17,6 +17,7 @@ PV .= "+git${SRCREV}"
17RDEPENDS:${PN} += "bash python3 xz" 17RDEPENDS:${PN} += "bash python3 xz"
18 18
19SRC_URI = "git://github.com/iovisor/bpftrace;branch=master;protocol=https \ 19SRC_URI = "git://github.com/iovisor/bpftrace;branch=master;protocol=https \
20 file://0001-replace-python-with-python3-in-the-test.patch \
20 file://run-ptest \ 21 file://run-ptest \
21" 22"
22SRCREV = "1326f040a0f88287ccbc8c18fe8956bca4cc225d" 23SRCREV = "1326f040a0f88287ccbc8c18fe8956bca4cc225d"