From 2eed1262db46f7df516048ed5650e9dcd94a28f2 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Fri, 25 Jan 2019 12:50:52 +0100 Subject: [PATCH] coverage.sh: create tarball as root with /tmp mounted nodev --- coverage.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/coverage.sh b/coverage.sh index 702850a..b8aa0ed 100755 --- a/coverage.sh +++ b/coverage.sh @@ -288,6 +288,24 @@ else echo "HAVE_QEMU != yes -- Skipping test..." fi +print_header "mode=root,variant=apt: create tarball with /tmp mounted nodev" +cat << END > shared/test.sh +#!/bin/sh +set -eu +export LC_ALL=C.UTF-8 +mount -t tmpfs -o nodev,nosuid,size=300M tmpfs /tmp +# use --customize to exercise the mounting/unmounting code of block devices in root mode +$CMD --mode=root --variant=apt --customize='mount | grep /dev/full' --customize='test "\$(echo foo | tee /dev/full 2>&1 1>/dev/null)" = "tee: /dev/full: No space left on device"' unstable /tmp/unstable-chroot.tar $mirror +tar -tf /tmp/unstable-chroot.tar | sort > tar2.txt +diff -u tar1.txt tar2.txt +rm /tmp/unstable-chroot.tar +END +if [ "$HAVE_QEMU" = "yes" ]; then + ./run_qemu.sh +else + echo "HAVE_QEMU != yes -- Skipping test..." +fi + print_header "mode=$defaultmode,variant=apt: read from stdin, write to stdout" cat << END > shared/test.sh #!/bin/sh