TEST-13-NSPAWN: the host kernel may not support /proc/kcore
This commit is contained in:
@@ -39,6 +39,12 @@ create_dummy_container "$OCI/rootfs"
|
||||
mkdir -p "$OCI/rootfs/opt/var"
|
||||
mkdir -p "$OCI/rootfs/opt/readonly"
|
||||
|
||||
if [[ -e /proc/kcore ]]; then
|
||||
HAVE_PROC_KCORE=1
|
||||
else
|
||||
HAVE_PROC_KCORE=0
|
||||
fi
|
||||
|
||||
# Let's start with a simple config
|
||||
cat >"$OCI/config.json" <<EOF
|
||||
{
|
||||
@@ -376,8 +382,12 @@ test -b "$DEV"
|
||||
[[ "\$(stat -c '%t:%T' "$DEV")" == 4:2 ]]
|
||||
|
||||
# Linux - maskedPaths
|
||||
test -e /proc/kcore
|
||||
cat /proc/kcore && exit 1
|
||||
if [[ "$HAVE_PROC_KCORE" == 1 ]]; then
|
||||
test -e /proc/kcore
|
||||
cat /proc/kcore && exit 1
|
||||
else
|
||||
test ! -e /proc/kcore
|
||||
fi
|
||||
test ! -e /root/nonexistent
|
||||
|
||||
# Linux - readonlyPaths
|
||||
|
||||
Reference in New Issue
Block a user