summaryrefslogtreecommitdiff
path: root/tests/misc/truncate-overflow.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/truncate-overflow.sh')
-rwxr-xr-xtests/misc/truncate-overflow.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/misc/truncate-overflow.sh b/tests/misc/truncate-overflow.sh
index a4a513cf0..c690c4068 100755
--- a/tests/misc/truncate-overflow.sh
+++ b/tests/misc/truncate-overflow.sh
@@ -27,13 +27,13 @@ truncate -s-1 create-zero-len-file || fail=1
echo > non-empty-file
# signed overflow
-truncate -s$OFF_T_OFLOW file && fail=1
+returns_ 1 truncate -s$OFF_T_OFLOW file || fail=1
# += signed overflow
-truncate -s+$OFF_T_MAX non-empty-file && fail=1
+returns_ 1 truncate -s+$OFF_T_MAX non-empty-file || fail=1
# *= signed overflow
IO_BLOCK_OFLOW=$(expr $OFF_T_MAX / $(stat -f -c%s .) + 1)
-truncate --io-blocks --size=$IO_BLOCK_OFLOW file && fail=1
+returns_ 1 truncate --io-blocks --size=$IO_BLOCK_OFLOW file || fail=1
Exit $fail