Message ID | 20220510155438.15754-5-pvorel@suse.cz |
---|---|
State | Superseded |
Headers | show |
Series | shell: Add $TST_MOUNT_DEVICE support | expand |
Hi all, > +++ b/lib/newlib_tests/shell/tst_mount_device.sh ... > +TST_MOUNT_DEVICE=1 > +TST_FS_TYPE=ext4 > +TST_TESTFUNC=test > +TST_CNT=2 > +. tst_test.sh Obviously loading should be later. > + > +test1() > +{ > + tst_res TPASS "device formatted" > +} > + > +test2() > +{ > + EXPECT_PASS "grep '$TST_MNTPOINT $TST_FS_TYPE' /proc/mounts" > +} > + Here. I'll fix it before merge (if it's the only change requested). > +tst_run Kind regards, Petr
diff --git a/lib/newlib_tests/shell/tst_mount_device.sh b/lib/newlib_tests/shell/tst_mount_device.sh new file mode 100755 index 000000000..a30f15bf6 --- /dev/null +++ b/lib/newlib_tests/shell/tst_mount_device.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2022 Petr Vorel <pvorel@suse.cz> + +TST_MOUNT_DEVICE=1 +TST_FS_TYPE=ext4 +TST_TESTFUNC=test +TST_CNT=2 +. tst_test.sh + +test1() +{ + tst_res TPASS "device formatted" +} + +test2() +{ + EXPECT_PASS "grep '$TST_MNTPOINT $TST_FS_TYPE' /proc/mounts" +} + +tst_run
Unfortunately GitHub Actions don't have loop devices, thus cannot be run in CI: tst_format_device 1 TINFO: timeout per run is 0h 5m 0s /__w/ltp/ltp/lib/tst_device.c:139: TINFO: No free devices found Signed-off-by: Petr Vorel <pvorel@suse.cz> --- lib/newlib_tests/shell/tst_mount_device.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 lib/newlib_tests/shell/tst_mount_device.sh