File tree Expand file tree Collapse file tree
tools/testing/selftests/ublk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ _prep_test() {
8080 local type=$1
8181 shift 1
8282 modprobe ublk_drv
83- echo " ublk $type : $* "
83+ [ " $UBLK_TEST_QUIET " -eq 0 ] && echo " ublk $type : $* "
8484}
8585
8686_remove_test_files ()
@@ -209,6 +209,12 @@ __run_io_and_remove()
209209 wait
210210}
211211
212+ _ublk_test_top_dir ()
213+ {
214+ cd " $( dirname " $0 " ) " && pwd
215+ }
212216
213- UBLK_PROG=$( pwd) /kublk
217+ UBLK_PROG=$( _ublk_test_top_dir) /kublk
218+ UBLK_TEST_QUIET=1
214219export UBLK_PROG
220+ export UBLK_TEST_QUIET
Original file line number Diff line number Diff line change 11#! /bin/bash
22# SPDX-License-Identifier: GPL-2.0
33
4- . test_common.sh
4+ . " $( cd " $( dirname " $0 " ) " && pwd ) " / test_common.sh
55
66TID=" loop_01"
77ERR_CODE=0
Original file line number Diff line number Diff line change 11#! /bin/bash
22# SPDX-License-Identifier: GPL-2.0
33
4- . test_common.sh
4+ . " $( cd " $( dirname " $0 " ) " && pwd ) " / test_common.sh
55
66TID=" loop_02"
77ERR_CODE=0
Original file line number Diff line number Diff line change 11#! /bin/bash
22# SPDX-License-Identifier: GPL-2.0
33
4- . test_common.sh
4+ . " $( cd " $( dirname " $0 " ) " && pwd ) " / test_common.sh
55
66TID=" loop_03"
77ERR_CODE=0
Original file line number Diff line number Diff line change 11#! /bin/bash
22# SPDX-License-Identifier: GPL-2.0
33
4- . test_common.sh
4+ . " $( cd " $( dirname " $0 " ) " && pwd ) " / test_common.sh
55
66TID=" loop_04"
77ERR_CODE=0
Original file line number Diff line number Diff line change 11#! /bin/bash
22# SPDX-License-Identifier: GPL-2.0
33
4- . test_common.sh
4+ . " $( cd " $( dirname " $0 " ) " && pwd ) " / test_common.sh
55
66TID=" null_01"
77ERR_CODE=0
Original file line number Diff line number Diff line change 11#! /bin/bash
22# SPDX-License-Identifier: GPL-2.0
33
4- . test_common.sh
4+ . " $( cd " $( dirname " $0 " ) " && pwd ) " / test_common.sh
55TID=" stress_01"
66ERR_CODE=0
77DEV_ID=-1
@@ -17,7 +17,7 @@ ublk_io_and_remove()
1717 DEV_ID=$( _add_ublk_dev " $@ " )
1818 _check_add_dev $TID $? " ${backfile} "
1919
20- echo " run ublk IO vs. remove device(ublk add $* )"
20+ [ " $UBLK_TEST_QUIET " -eq 0 ] && echo " run ublk IO vs. remove device(ublk add $* )"
2121 if ! __run_io_and_remove " ${DEV_ID} " " ${size} " " no" ; then
2222 echo " /dev/ublkc${DEV_ID} isn't removed"
2323 _remove_backfile " ${backfile} "
Original file line number Diff line number Diff line change 11#! /bin/bash
22# SPDX-License-Identifier: GPL-2.0
33
4- . test_common.sh
4+ . " $( cd " $( dirname " $0 " ) " && pwd ) " / test_common.sh
55TID=" stress_02"
66ERR_CODE=0
77DEV_ID=-1
@@ -17,7 +17,7 @@ ublk_io_and_kill_daemon()
1717 DEV_ID=$( _add_ublk_dev " $@ " )
1818 _check_add_dev $TID $? " ${backfile} "
1919
20- echo " run ublk IO vs kill ublk server(ublk add $* )"
20+ [ " $UBLK_TEST_QUIET " -eq 0 ] && echo " run ublk IO vs kill ublk server(ublk add $* )"
2121 if ! __run_io_and_remove " ${DEV_ID} " " ${size} " " yes" ; then
2222 echo " /dev/ublkc${DEV_ID} isn't removed res ${res} "
2323 _remove_backfile " ${backfile} "
You can’t perform that action at this time.
0 commit comments