]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: dd: add test case for OOM with skip=1
authoroech3 <79379754+oech3@users.noreply.github.com>
Wed, 20 May 2026 05:40:25 +0000 (14:40 +0900)
committerPádraig Brady <P@draigBrady.com>
Wed, 20 May 2026 12:09:28 +0000 (13:09 +0100)
* tests/dd/no-allocate.sh: Add test cases for OOM with skip=1.
https://github.com/coreutils/coreutils/pull/265

tests/dd/no-allocate.sh

index 02fdef5eea6eb529922f0110dc8d480019aca4f3..8d247fb168f70bdc221f98d0271fbb59f2a8fa0f 100755 (executable)
@@ -29,6 +29,8 @@ rm f f2 || framework_failure_
 # Ensure dd exits with 1 if memory exhausted
 (ulimit -v $(($vm+6000)) && returns_ 1 \
  dd if=/dev/null of=/dev/null bs=$(($SSIZE_MAX-1))) || fail=1
+(ulimit -v $(($vm+6000)) && returns_ 1 \
+ dd if=/dev/null of=/dev/null bs=$(($SSIZE_MAX-1)) skip=1) || fail=1
 # Ensure dd exits with 1 on numeric overflow
 (ulimit -v $(($vm+6000)) && returns_ 1 \
  dd if=/dev/null of=/dev/null bs=$SIZE_OFLOW) || fail=1