summaryrefslogtreecommitdiffstats
path: root/tests/fail-installing-to-non-empty-lost-found
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fail-installing-to-non-empty-lost-found')
-rw-r--r--tests/fail-installing-to-non-empty-lost-found13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/fail-installing-to-non-empty-lost-found b/tests/fail-installing-to-non-empty-lost-found
new file mode 100644
index 0000000..4130bf5
--- /dev/null
+++ b/tests/fail-installing-to-non-empty-lost-found
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -eu
+export LC_ALL=C.UTF-8
+trap "rm /tmp/debian-chroot/lost+found/exists; rmdir /tmp/debian-chroot/lost+found /tmp/debian-chroot" EXIT INT TERM
+mkdir /tmp/debian-chroot
+mkdir /tmp/debian-chroot/lost+found
+touch /tmp/debian-chroot/lost+found/exists
+ret=0
+{{ CMD }} --mode={{ MODE }} --variant=apt {{ DIST }} /tmp/debian-chroot {{ MIRROR }} || ret=$?
+if [ "$ret" = 0 ]; then
+ echo expected failure but got exit $ret >&2
+ exit 1
+fi