From: Milind Changire Date: Tue, 24 Sep 2024 08:36:10 +0000 (+0530) Subject: qa: test fallocate fails in mode 0 X-Git-Tag: v20.0.0~710^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b0690837f31f4d0d357a7d0f73b1f8d4b733b82a;p=ceph.git qa: test fallocate fails in mode 0 Signed-off-by: Milind Changire --- diff --git a/qa/workunits/fs/misc/fallocate.sh b/qa/workunits/fs/misc/fallocate.sh new file mode 100755 index 000000000000..253e6cb7a377 --- /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