Skip to content

Commit b069083

Browse files
committed
qa: test fallocate fails in mode 0
Signed-off-by: Milind Changire <[email protected]>
1 parent ac34dd3 commit b069083

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

qa/workunits/fs/misc/fallocate.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh -x
2+
3+
# fallocate with mode 0 should fail with EOPNOTSUPP
4+
set -e
5+
mkdir -p testdir
6+
cd testdir
7+
8+
expect_failure() {
9+
if "$@"; then return 1; else return 0; fi
10+
}
11+
12+
expect_failure fallocate -l 1M preallocated.txt
13+
rm -f preallocated.txt
14+
15+
cd ..
16+
rmdir testdir
17+
echo OK

0 commit comments

Comments
 (0)