diff --git a/mock/integration-tests/22-rootdir.tst b/mock/integration-tests/22-rootdir.tst index 6a319d544..0bc983710 100644 --- a/mock/integration-tests/22-rootdir.tst +++ b/mock/integration-tests/22-rootdir.tst @@ -7,14 +7,17 @@ fi . "${TESTDIR}/functions" set -e -TMPDIR=$(mktemp -d) -cleanup() { rm -rf "$TMPDIR"; } +# creating special files (e.g. /dev/null doesn't work below tmpfs) +WORKDIR=$(mktemp -d -p "$HOME") + +cleanup() { rm -rf "$WORKDIR"; } trap cleanup EXIT header "mock with --rootdir option" for isolation in simple nspawn; do - runcmd "$MOCKCMD --isolation=$isolation --rootdir=$TMPDIR --scrub=chroot" - runcmd "$MOCKCMD --isolation=$isolation --rootdir=$TMPDIR --scrub=bootstrap" - runcmd "$MOCKCMD --isolation=$isolation --rootdir=$TMPDIR --bootstrap-chroot ${TESTDIR}/test-C-1.1-0.src.rpm" + rootdir=$WORKDIR/$isolation + runcmd "$MOCKCMD --isolation=$isolation --rootdir=$rootdir --scrub=chroot" + runcmd "$MOCKCMD --isolation=$isolation --rootdir=$rootdir --scrub=bootstrap" + runcmd "$MOCKCMD --isolation=$isolation --rootdir=$rootdir --bootstrap-chroot ${TESTDIR}/test-C-1.1-0.src.rpm" done