libseccomp: add tests

update busybox for extend head option for test suite
remove seq -f option as it is not supported buy busybox

Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Armin Kuster
2015-04-10 19:09:44 -07:00
parent 43fd825acf
commit 58096a9c97
4 changed files with 55 additions and 1 deletions

View File

@@ -0,0 +1 @@
CONFIG_FEATURE_FANCY_HEAD=y

View File

@@ -0,0 +1,3 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://head.cfg"

View File

@@ -0,0 +1,25 @@
Index: git/tests/regression
===================================================================
--- git.orig/tests/regression
+++ git/tests/regression
@@ -468,13 +468,13 @@ function run_test_bpf_sim() {
# and arg ranges and generate/run every combination of requested
# tests; if no ranges were specifed, then the single test is
# run
- for sys in $(seq -f "%1.0f" $low_syscall $high_syscall); do
- for arg0 in $(seq -f "%1.0f" ${low_arg[0]} ${high_arg[0]}); do
- for arg1 in $(seq -f "%1.0f" ${low_arg[1]} ${high_arg[1]}); do
- for arg2 in $(seq -f "%1.0f" ${low_arg[2]} ${high_arg[2]}); do
- for arg3 in $(seq -f "%1.0f" ${low_arg[3]} ${high_arg[3]}); do
- for arg4 in $(seq -f "%1.0f" ${low_arg[4]} ${high_arg[4]}); do
- for arg5 in $(seq -f "%1.0f" ${low_arg[5]} ${high_arg[5]}); do
+ for sys in $(seq $low_syscall $high_syscall); do
+ for arg0 in $(seq ${low_arg[0]} ${high_arg[0]}); do
+ for arg1 in $(seq ${low_arg[1]} ${high_arg[1]}); do
+ for arg2 in $(seq ${low_arg[2]} ${high_arg[2]}); do
+ for arg3 in $(seq ${low_arg[3]} ${high_arg[3]}); do
+ for arg4 in $(seq ${low_arg[4]} ${high_arg[4]}); do
+ for arg5 in $(seq ${low_arg[5]} ${high_arg[5]}); do
local -a arg=($arg0 $arg1 $arg2 $arg3 $arg4 $arg5)
# Get the generated sub-test num string

View File

@@ -8,7 +8,7 @@ SRCREV = "bd10aab13c7248cc0df57512617e33d6743d33a6"
PV = "2.2.0+git${SRCPV}"
SRC_URI = "git://github.com/seccomp/libseccomp.git;protocol=http \
SRC_URI = "git://github.com/seccomp/libseccomp.git \
file://0001-arch-add-a-ppc64-syscall-table.patch \
file://0002-arch-add-the-basic-initial-support-for-ppc64-to-the-.patch \
file://0003-tools-add-ppc64-support.patch \
@@ -20,6 +20,7 @@ SRC_URI = "git://github.com/seccomp/libseccomp.git;protocol=http \
file://0009-arch-add-basic-initial-ppc-support-to-the-arch-depen.patch \
file://0010-tools-add-ppc-support.patch \
file://0011-tests-add-ppc-support-to-the-regression-tests.patch \
file://regresion_fixup_seq_usage.patch \
"
S = "${WORKDIR}/git"
@@ -29,4 +30,28 @@ inherit autotools-brokensep pkgconfig
PACKAGECONFIG ??= ""
PACKAGECONFIG[python] = "--enable-python, --disable-python, python"
do_compile_appned() {
oe_runmake -C tests check-build
}
do_install_append() {
install -d ${D}/${libdir}/${PN}/tests
install -d ${D}/${libdir}/${PN}/tools
for file in $(find tests/* -executable -type f); do
install -m 744 ${S}/${file} ${D}/${libdir}/${PN}/tests
done
for file in $(find tests/*.tests -type f); do
install -m 744 ${S}/${file} ${D}/${libdir}/${PN}/tests
done
for file in $(find tools/* -executable -type f); do
install -m 744 ${S}/${file} ${D}/${libdir}/${PN}/tools
done
}
PACKAGES += " ${PN}-tests"
FILES_${PN} = "${bindir} ${libdir}/${PN}.so*"
FILES_${PN}-tests = "${libdir}/${PN}/tools ${libdir}/${PN}/tests"
FILES_${PN}-dbg += "${libdir}/${PN}/tests/.debug/* ${libdir}/${PN}/tools/.debug"
RDEPENDS_${PN} = "bash"
RDEPENDS_${PN}-tests = "bash"