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 <auke.kok@versity.com>
This commit is contained in:
Auke Kok
2024-08-23 15:46:26 -07:00
parent 7d0e7e29f8
commit 606c519e96
2 changed files with 3 additions and 3 deletions

View File

@@ -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)

View File

@@ -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"