diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2015-07-04 17:13:50 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2015-07-04 17:13:50 +0300 |
commit | 71cd8e3a743046573744123777061b64881bf372 (patch) | |
tree | 82522befe647f4fff186a5630cad0cad33f8ef53 /tests/misc/truncate-overflow.sh | |
parent | c18578632fd3c9e513e613a86ba2b7c4ebee6c45 (diff) | |
download | coreutils-upstream.tar.gz |
Imported Upstream version 8.24upstream/8.24upstream
Diffstat (limited to 'tests/misc/truncate-overflow.sh')
-rwxr-xr-x | tests/misc/truncate-overflow.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/misc/truncate-overflow.sh b/tests/misc/truncate-overflow.sh index 72ed626b..c690c406 100755 --- a/tests/misc/truncate-overflow.sh +++ b/tests/misc/truncate-overflow.sh @@ -1,7 +1,7 @@ #!/bin/sh # Validate truncate integer overflow -# Copyright (C) 2008-2014 Free Software Foundation, Inc. +# Copyright (C) 2008-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -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 |