7 tmpdir="$(wvmktempdir)"
8 export BUP_DIR="$tmpdir/bup"
11 bup() { "$top/bup" "$@"; }
14 # Fixed in commit 8585613c1f45f3e20feec00b24fc7e3a948fa23e ("Store
15 # metadata in the index....")
18 echo "content" > "$D"/foo
19 echo "content" > "$D"/bar
22 bup save -n save-fail-missing "$D"
23 echo "content" > "$D"/baz
27 # When "bup tick" is removed above, this may fail (complete with warning),
28 # since the ctime/mtime of "foo" might be pushed back:
29 WVPASS bup save -n save-fail-missing "$D"
30 # when the save-call failed, foo is missing from output, since only
31 # then bup notices, that it was removed:
32 WVPASSEQ "$(bup ls -a save-fail-missing/latest/$TOP/$D/)" "bar
38 WVPASS bup save -n save-fail-missing "$D"
40 WVPASSEQ "$(bup ls -a save-fail-missing/latest/$TOP/$D/)" "bar
44 # TODO: Test for racecondition between reading a file and reading its metadata?
55 bup save -n save-fail-missing "$D"
61 # with directories, bup notices that foo is missing, so it fails
62 # (complete with delayed error)
63 WVFAIL bup save -n save-fail-missing "$D"
64 # ... so "foo" is absent from "bup ls"
65 WVPASSEQ "$(bup ls -a save-fail-missing/latest/$TOP/$D/)" "bar/
70 # no non-zero-exitcode anymore:
71 WVPASS bup save -n save-fail-missing "$D"
72 # foo is (still...) missing, of course:
73 WVPASSEQ "$(bup ls -a save-fail-missing/latest/$TOP/$D/)" "bar/