numam-spdk/test/dd/malloc.sh
Michal Berger 0814f8662a test/dd: Add simply copy test between malloc bdevs
Validates basic functionality prior running more complex setup from
bdev_to_bdev.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I4e10cba6e0284f82e180c4a05288035c61e3fe9f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9940
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-15 12:00:30 +00:00

34 lines
686 B
Bash
Executable File

#!/usr/bin/env bash
testdir=$(readlink -f "$(dirname "$0")")
rootdir=$(readlink -f "$testdir/../../")
source "$testdir/common.sh"
malloc_copy() {
local mbdev0=malloc0 mbdev0_b=1048576 mbdev0_bs=512
local mbdev1=malloc1 mbdev1_b=1048576 mbdev1_bs=512
local -A method_bdev_malloc_create_0=(
["name"]=$mbdev0
["num_blocks"]=$mbdev0_b
["block_size"]=$mbdev0_bs
)
local -A method_bdev_malloc_create_1=(
["name"]=$mbdev1
["num_blocks"]=$mbdev1_b
["block_size"]=$mbdev1_bs
)
"${DD_APP[@]}" \
--ib="$mbdev0" \
--ob="$mbdev1" \
--json <(gen_conf)
"${DD_APP[@]}" \
--ib="$mbdev1" \
--ob="$mbdev0" \
--json <(gen_conf)
}
run_test "dd_malloc_copy" malloc_copy