ceph/qa/workunits/snaps/snaptest-0.sh

29 lines
440 B
Bash
Raw Normal View History

#!/bin/sh -x
expect_failure() {
if [ `"$@"` -e 0 ]; then
return 1
fi
return 0
}
set -e
expect_failure mkdir .snap/foo
ceph mds set allow_new_snaps --yes-i-really-mean-it
echo asdf > foo
mkdir .snap/foo
grep asdf .snap/foo/foo
rmdir .snap/foo
echo asdf > bar
mkdir .snap/bar
rm bar
grep asdf .snap/bar/bar
rmdir .snap/bar
2010-08-24 23:01:47 +00:00
rm foo
ceph mds unset allow_new_snaps --yes-i-really-mean-it
expect_failure mkdir .snap/baz
2010-08-24 23:01:47 +00:00
echo OK