test/dd: Make the AIO file smaller
Make the footprint of the test smaller by creating smaller AIO file - 2G instead of 8G. Adjust offseting as well to not fall outside of the device|file. Also, cap in half the size of the source file. Change-Id: I625eebe545477239606cd65ac6949cca4a2b8c80 Signed-off-by: Michal Berger <michalx.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3842 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
a52c6b194c
commit
4eed3b0839
@ -9,7 +9,7 @@ offset_magic() {
|
|||||||
local magic_check
|
local magic_check
|
||||||
local offsets offset
|
local offsets offset
|
||||||
|
|
||||||
offsets=(16 256 4096) # * bs
|
offsets=(16 256 1024) # * bs
|
||||||
|
|
||||||
for offset in "${offsets[@]}"; do
|
for offset in "${offsets[@]}"; do
|
||||||
"${DD_APP[@]}" \
|
"${DD_APP[@]}" \
|
||||||
@ -34,9 +34,9 @@ offset_magic() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
# Zero up to 1G on input bdev, 4G on out bdev to consider offsetting
|
# Zero up to 1G on input|output bdev
|
||||||
clear_nvme "$bdev0" "" $((0x40000000 + ${#magic}))
|
clear_nvme "$bdev0" "" $((0x40000000 + ${#magic}))
|
||||||
clear_nvme "$bdev1" "" $((0x100000000 + ${#magic}))
|
clear_nvme "$bdev1" "" $((0x40000000 + ${#magic}))
|
||||||
rm -f "$test_file0" "$test_file1" "$aio1"
|
rm -f "$test_file0" "$test_file1" "$aio1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,12 +74,12 @@ else
|
|||||||
["block_size"]=4096
|
["block_size"]=4096
|
||||||
)
|
)
|
||||||
|
|
||||||
# 8G AIO file
|
# 2G AIO file
|
||||||
"${DD_APP[@]}" \
|
"${DD_APP[@]}" \
|
||||||
--if=/dev/zero \
|
--if=/dev/zero \
|
||||||
--of="$aio1" \
|
--of="$aio1" \
|
||||||
--bs="$bs" \
|
--bs="$bs" \
|
||||||
--count=8192
|
--count=2048
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test_file0=$SPDK_TEST_STORAGE/dd.dump0
|
test_file0=$SPDK_TEST_STORAGE/dd.dump0
|
||||||
@ -88,14 +88,14 @@ test_file1=$SPDK_TEST_STORAGE/dd.dump1
|
|||||||
magic="This Is Our Magic, find it"
|
magic="This Is Our Magic, find it"
|
||||||
echo "$magic" > "$test_file0"
|
echo "$magic" > "$test_file0"
|
||||||
|
|
||||||
# Make the file a bit bigger (~1GB)
|
# Make the file a bit bigger (~512MB)
|
||||||
run_test "dd_inflate_file" \
|
run_test "dd_inflate_file" \
|
||||||
"${DD_APP[@]}" \
|
"${DD_APP[@]}" \
|
||||||
--if=/dev/zero \
|
--if=/dev/zero \
|
||||||
--of="$test_file0" \
|
--of="$test_file0" \
|
||||||
--oflag=append \
|
--oflag=append \
|
||||||
--bs="$bs" \
|
--bs="$bs" \
|
||||||
--count=1024
|
--count=512
|
||||||
|
|
||||||
test_file0_size=$(wc -c < "$test_file0")
|
test_file0_size=$(wc -c < "$test_file0")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user