summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-kernel/kernel-selftest
diff options
context:
space:
mode:
authorDengke Du <dengke.du@windriver.com>2018-08-17 17:33:01 -0700
committerKhem Raj <raj.khem@gmail.com>2018-08-19 16:09:28 -0700
commite88b38a9d214c3296892e0e6f6c6b444d1d48a54 (patch)
tree1308de05838d3780a0628cddf4af98ece21db85b /meta-oe/recipes-kernel/kernel-selftest
parentafb81129061d7d856ed88fce8cc052e01770c7cd (diff)
downloadmeta-openembedded-e88b38a9d214c3296892e0e6f6c6b444d1d48a54.tar.gz
kernel-selftest: add ptest support
Group the kernel-selftest testcases in run-ptest. Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-kernel/kernel-selftest')
-rw-r--r--meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb4
-rwxr-xr-xmeta-oe/recipes-kernel/kernel-selftest/kernel-selftest/run-ptest11
2 files changed, 14 insertions, 1 deletions
diff --git a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
index 220250c33..f407d077b 100644
--- a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
+++ b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb
@@ -10,6 +10,8 @@ DEPENDS = "rsync-native"
10SRC_URI_libc-musl += "file://userfaultfd.patch \ 10SRC_URI_libc-musl += "file://userfaultfd.patch \
11 file://0001-bpf-test_progs.c-add-support-for-musllibc.patch \ 11 file://0001-bpf-test_progs.c-add-support-for-musllibc.patch \
12" 12"
13SRC_URI += "file://run-ptest \
14"
13 15
14# now we just test bpf and vm 16# now we just test bpf and vm
15# we will append other kernel selftest in the future 17# we will append other kernel selftest in the future
@@ -22,7 +24,7 @@ PACKAGECONFIG[vm] = ",,,libgcc bash"
22 24
23do_patch[depends] += "virtual/kernel:do_shared_workdir" 25do_patch[depends] += "virtual/kernel:do_shared_workdir"
24 26
25inherit linux-kernel-base kernel-arch 27inherit linux-kernel-base kernel-arch ptest
26 28
27do_populate_lic[depends] += "virtual/kernel:do_patch" 29do_populate_lic[depends] += "virtual/kernel:do_patch"
28 30
diff --git a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/run-ptest b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/run-ptest
new file mode 100755
index 000000000..d40b9576d
--- /dev/null
+++ b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/run-ptest
@@ -0,0 +1,11 @@
1#!/bin/sh
2export PATH=$PATH:/usr/kernel-selftest/bpf
3
4# test_align
5test_align | grep "12 pass" &> /dev/null
6if [ $? == 0 ]; then
7 echo "[PASS]: test_align"
8else
9 echo "[FAIL]: test_align"
10fi
11