From ac02e8c43ff1fbaf1086d746a1a0a975c9218ef0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 14 Apr 2016 22:50:21 -0400 Subject: Print an error when trying to sync a copy with itself. Fixes https://labs.parabola.nu/issues/920 --- test/librechroot-test.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') 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 +} -- cgit v1.2.3-54-g00ecf