aboutsummaryrefslogtreecommitdiffstats
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
parentafb81129061d7d856ed88fce8cc052e01770c7cd (diff)
downloadmeta-openembedded-contrib-e88b38a9d214c3296892e0e6f6c6b444d1d48a54.tar.gz
meta-openembedded-contrib-e88b38a9d214c3296892e0e6f6c6b444d1d48a54.tar.bz2
meta-openembedded-contrib-e88b38a9d214c3296892e0e6f6c6b444d1d48a54.zip
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>
-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 220250c33b..f407d077ba 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"
SRC_URI_libc-musl += "file://userfaultfd.patch \
file://0001-bpf-test_progs.c-add-support-for-musllibc.patch \
"
+SRC_URI += "file://run-ptest \
+"
# now we just test bpf and vm
# we will append other kernel selftest in the future
@@ -22,7 +24,7 @@ PACKAGECONFIG[vm] = ",,,libgcc bash"
do_patch[depends] += "virtual/kernel:do_shared_workdir"
-inherit linux-kernel-base kernel-arch
+inherit linux-kernel-base kernel-arch ptest
do_populate_lic[depends] += "virtual/kernel:do_patch"
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 0000000000..d40b9576d8
--- /dev/null
+++ b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest/run-ptest
@@ -0,0 +1,11 @@
+#!/bin/sh
+export PATH=$PATH:/usr/kernel-selftest/bpf
+
+# test_align
+test_align | grep "12 pass" &> /dev/null
+if [ $? == 0 ]; then
+ echo "[PASS]: test_align"
+else
+ echo "[FAIL]: test_align"
+fi
+