mirror of
https://github.com/torvalds/linux.git
synced 2026-04-21 08:13:56 -04:00
Move integrity-focused tests into new 'integrity' group: - test_null_04.sh -> test_integrity_01.sh - test_loop_08.sh -> test_integrity_02.sh Move recovery-focused tests into new 'recover' group: - test_generic_04.sh -> test_recover_01.sh - test_generic_05.sh -> test_recover_02.sh - test_generic_11.sh -> test_recover_03.sh - test_generic_14.sh -> test_recover_04.sh Update Makefile to reflect the reorganization. Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
40 lines
982 B
Bash
Executable File
40 lines
982 B
Bash
Executable File
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
. "$(cd "$(dirname "$0")" && pwd)"/test_common.sh
|
|
|
|
ERR_CODE=0
|
|
|
|
ublk_run_recover_test()
|
|
{
|
|
run_io_and_recover 256M "kill_daemon" "$@"
|
|
ERR_CODE=$?
|
|
if [ ${ERR_CODE} -ne 0 ]; then
|
|
echo "$TID failure: $*"
|
|
_show_result $TID $ERR_CODE
|
|
fi
|
|
}
|
|
|
|
if ! _have_program fio; then
|
|
exit "$UBLK_SKIP_CODE"
|
|
fi
|
|
|
|
_prep_test "recover" "basic recover function verification (user copy)"
|
|
|
|
_create_backfile 0 256M
|
|
_create_backfile 1 128M
|
|
_create_backfile 2 128M
|
|
|
|
ublk_run_recover_test -t null -q 2 -r 1 -u &
|
|
ublk_run_recover_test -t loop -q 2 -r 1 -u "${UBLK_BACKFILES[0]}" &
|
|
ublk_run_recover_test -t stripe -q 2 -r 1 -u "${UBLK_BACKFILES[1]}" "${UBLK_BACKFILES[2]}" &
|
|
wait
|
|
|
|
ublk_run_recover_test -t null -q 2 -r 1 -u -i 1 &
|
|
ublk_run_recover_test -t loop -q 2 -r 1 -u -i 1 "${UBLK_BACKFILES[0]}" &
|
|
ublk_run_recover_test -t stripe -q 2 -r 1 -u -i 1 "${UBLK_BACKFILES[1]}" "${UBLK_BACKFILES[2]}" &
|
|
wait
|
|
|
|
_cleanup_test "recover"
|
|
_show_result $TID $ERR_CODE
|