From 606c519e96ea984134313135f83f76020503541c Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Fri, 23 Aug 2024 15:46:26 -0700 Subject: [PATCH] Simple-staging doesn't actually test overflow. This isn't a simple case where we can use u64_region_wraps because length is s32. Let's actually test an overflow case instead of a case that doesn't overflow, though. We still should properly add an overflow test here as well. Signed-off-by: Auke Kok --- tests/golden/simple-staging | 2 +- tests/tests/simple-staging.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/golden/simple-staging b/tests/golden/simple-staging index d05c8496..508732ca 100644 --- a/tests/golden/simple-staging +++ b/tests/golden/simple-staging @@ -7,7 +7,7 @@ stage: must provide file version with --data-version Try `stage --help' or `stage --usage' for more information. == wrapped region fails -stage returned -1, not 4096: error Invalid argument (22) +stage returned -1, not 8192: error Invalid argument (22) scoutfs: stage failed: Input/output error (5) == non-block aligned offset fails stage returned -1, not 4095: error Invalid argument (22) diff --git a/tests/tests/simple-staging.sh b/tests/tests/simple-staging.sh index ad059bd0..471cf7a0 100644 --- a/tests/tests/simple-staging.sh +++ b/tests/tests/simple-staging.sh @@ -143,8 +143,8 @@ hexdump -C "$FILE" rm -f "$FILE" echo "== wrapped region fails" -create_file "$FILE" 4096 -stage_vers "$FILE" stat 0xFFFFFFFFFFFFF000 4096 /dev/zero +create_file "$FILE" 8192 +stage_vers "$FILE" stat 0xFFFFFFFFFFFFF000 8192 /dev/zero rm -f "$FILE" echo "== non-block aligned offset fails"