diff options
Diffstat (limited to 'qa/workunits/fs/misc/fallocate.sh')
-rwxr-xr-x | qa/workunits/fs/misc/fallocate.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/qa/workunits/fs/misc/fallocate.sh b/qa/workunits/fs/misc/fallocate.sh new file mode 100755 index 00000000000..253e6cb7a37 --- /dev/null +++ b/qa/workunits/fs/misc/fallocate.sh @@ -0,0 +1,17 @@ +#!/bin/sh -x + +# fallocate with mode 0 should fail with EOPNOTSUPP +set -e +mkdir -p testdir +cd testdir + +expect_failure() { + if "$@"; then return 1; else return 0; fi +} + +expect_failure fallocate -l 1M preallocated.txt +rm -f preallocated.txt + +cd .. +rmdir testdir +echo OK |