summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-04-14 22:50:21 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-04-14 22:50:21 -0400
commitac02e8c43ff1fbaf1086d746a1a0a975c9218ef0 (patch)
treeefdc3c87acbc9e3db881c85b2a7d0c6d09465787 /test
parenta68d0ebb827d3cf49a62694e5a62207900e6f3a4 (diff)
Print an error when trying to sync a copy with itself.
Fixes https://labs.parabola.nu/issues/920
Diffstat (limited to 'test')
-rw-r--r--test/librechroot-test.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/librechroot-test.sh b/test/librechroot-test.sh
index 9960fdb..667246c 100644
--- a/test/librechroot-test.sh
+++ b/test/librechroot-test.sh
@@ -116,3 +116,14 @@ it_fails_for_unknown_flags() {
empty $tmpdir/stdout
not empty $tmpdir/stderr
}
+
+it_fails_when_syncing_a_copy_with_itself() {
+ require sudo || return 0
+ testsudo timeout 5 librechroot -l root sync || stat=$?
+ case $stat in
+ 0|124|137) # success|timeout+TERM|timeout+KILL
+ false;;
+ *)
+ true;;
+ esac
+}