mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
Add a test case for bcc to packages.
Signed-off-by: Krister Johansen <krister.johansen@oracle.com>
This commit is contained in:
parent
0643093f6a
commit
6e48041dee
9
test/cases/040_packages/032_bcc/check.sh
Executable file
9
test/cases/040_packages/032_bcc/check.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
nsenter -t 1 -m -- /bin/ash -c "/usr/share/bcc/tools/softirqs 1 1"
|
||||
if [ "$?" -ne "0" ]; then
|
||||
printf "bcc test suite FAILED\n" >&1
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
printf "bcc test suite PASSED\n" >&1
|
24
test/cases/040_packages/032_bcc/test.sh
Normal file
24
test/cases/040_packages/032_bcc/test.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Check that the bcc package works
|
||||
# LABELS: skip
|
||||
# REPEAT:
|
||||
|
||||
set -e
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
NAME=bcc
|
||||
|
||||
clean_up() {
|
||||
rm -rf ${NAME}-*
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
linuxkit build -format kernel+initrd -name "${NAME}" test.yml
|
||||
RESULT="$(linuxkit run ${NAME})"
|
||||
echo "${RESULT}"
|
||||
echo "${RESULT}" | grep -q "suite PASSED"
|
||||
|
||||
exit 0
|
29
test/cases/040_packages/032_bcc/test.yml
Normal file
29
test/cases/040_packages/032_bcc/test.yml
Normal file
@ -0,0 +1,29 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.14.54
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:v0.5
|
||||
- linuxkit/runc:v0.5
|
||||
- linuxkit/kernel-bcc:4.14.54
|
||||
onboot:
|
||||
- name: check-bcc
|
||||
image: alpine:3.8
|
||||
binds:
|
||||
- /check.sh:/check.sh
|
||||
command: ["sh", "./check.sh"]
|
||||
pid: host
|
||||
net: host
|
||||
ipc: host
|
||||
capabilities:
|
||||
- all
|
||||
- name: poweroff
|
||||
image: linuxkit/poweroff:2687ed712690766b8156a77ac600005b532d2c7d
|
||||
command: ["/bin/sh", "/poweroff.sh", "10"]
|
||||
files:
|
||||
- path: check.sh
|
||||
source: ./check.sh
|
||||
trust:
|
||||
org:
|
||||
- linuxkit
|
||||
image:
|
||||
- alpine:3.8
|
Loading…
Reference in New Issue
Block a user