Commit a6bbb382 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

test/dd: Lower file|bdev sizes in bdev_to_bdev tests



This is done to speed up the tests - the bigger the data to write the
more time the spdk_dd needs to finish after io is completed. This
should not affect the functional nature of the test itself.

Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Change-Id: Id086b153cffbd8045c8dbceaac64a98e358fe1ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9938


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 1b5d4b52
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ offset_magic() {
	local magic_check
	local offsets offset

	offsets=(16 256 1024) # * bs
	offsets=(16 64) # * bs

	for offset in "${offsets[@]}"; do
		"${DD_APP[@]}" \
@@ -34,9 +34,9 @@ offset_magic() {
}

cleanup() {
	# Zero up to 1G on input|output bdev
	clear_nvme "$bdev0" "" $((0x40000000 + ${#magic}))
	clear_nvme "$bdev1" "" $((0x40000000 + ${#magic}))
	# Zero up to 64M on input|output bdev
	clear_nvme "$bdev0" "" $((0x400000 + ${#magic}))
	clear_nvme "$bdev1" "" $((0x400000 + ${#magic}))
	rm -f "$test_file0" "$test_file1" "$aio1"
}

@@ -74,12 +74,12 @@ else
		["block_size"]=4096
	)

	# 2G AIO file
	# 256MB AIO file
	"${DD_APP[@]}" \
		--if=/dev/zero \
		--of="$aio1" \
		--bs="$bs" \
		--count=2048
		--count=256
fi

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"
echo "$magic" > "$test_file0"

# Make the file a bit bigger (~512MB)
# Make the file a bit bigger (~64MB)
run_test "dd_inflate_file" \
	"${DD_APP[@]}" \
	--if=/dev/zero \
	--of="$test_file0" \
	--oflag=append \
	--bs="$bs" \
	--count=512
	--count=64

test_file0_size=$(wc -c < "$test_file0")