From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Petr Vorel <pvorel@suse.cz>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH v2 5/6] shell: Add test for TST_FORMAT_DEVICE=1
Date: Fri, 11 Feb 2022 05:17:15 +0000 [thread overview]
Message-ID: <6205F185.5080603@fujitsu.com> (raw)
In-Reply-To: <20220210162739.30159-6-pvorel@suse.cz>
Hi Petr
> 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>
> ---
> Same as in v1
>
> lib/newlib_tests/shell/tst_format_device.sh | 24 +++++++++++++++++++++
> 1 file changed, 24 insertions(+)
> create mode 100755 lib/newlib_tests/shell/tst_format_device.sh
>
> diff --git a/lib/newlib_tests/shell/tst_format_device.sh b/lib/newlib_tests/shell/tst_format_device.sh
> new file mode 100755
> index 0000000000..b02f8b122b
> --- /dev/null
> +++ b/lib/newlib_tests/shell/tst_format_device.sh
> @@ -0,0 +1,24 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +# Copyright (c) 2022 Petr Vorel<pvorel@suse.cz>
> +
> +TST_FORMAT_DEVICE=1
> +TST_TESTFUNC=test
> +TST_CNT=2
> +TST_DEV_FS_OPTS="-b 1024 -O quota"
> +TST_DEV_EXTRA_OPTS="5m"
> +TST_NEEDS_CMDS="df lsblk"
> +. tst_test.sh
> +
> +test1()
> +{
> + tst_res TPASS "device formatted"
> +}
> +
> +test2()
> +{
> + tst_check_cmds df || return
We have checked df command in TST_NEEDS_CMDS, why still check it again
in here?
Best Regards
Yang Xu
> + EXPECT_PASS "df $TST_DEVICE | grep -q /dev"
> +}
> +
> +tst_run
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-02-11 5:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-10 16:27 [LTP] [PATCH v2 0/6] Add TST_FORMAT_DEVICE support Petr Vorel
2022-02-10 16:27 ` [LTP] [PATCH v2 1/6] tst_test.sh: Properly init $TST_FS_TYPE Petr Vorel
2022-03-11 13:55 ` Cyril Hrubis
2022-02-10 16:27 ` [LTP] [PATCH v2 2/6] tst_test.sh: Redesing tst_mkfs() API Petr Vorel
2022-03-11 14:08 ` Cyril Hrubis
2022-02-10 16:27 ` [LTP] [PATCH v2 3/6] tst_test.sh: Add $TST_FORMAT_DEVICE and related vars Petr Vorel
2022-02-11 6:58 ` xuyang2018.jy
2022-02-11 7:15 ` Petr Vorel
2022-03-11 14:28 ` Cyril Hrubis
2022-03-13 21:48 ` Petr Vorel
2022-02-10 16:27 ` [LTP] [PATCH v2 4/6] df01.sh: Use TST_FORMAT_DEVICE=1 Petr Vorel
2022-03-11 14:34 ` Cyril Hrubis
2022-02-10 16:27 ` [LTP] [PATCH v2 5/6] shell: Add test for TST_FORMAT_DEVICE=1 Petr Vorel
2022-02-11 5:17 ` xuyang2018.jy [this message]
2022-02-11 6:44 ` Petr Vorel
2022-03-11 14:36 ` Cyril Hrubis
2022-02-10 16:27 ` [LTP] [PATCH v2 6/6] doc: Add missing shell variables Petr Vorel
2022-02-11 6:28 ` xuyang2018.jy
2022-02-11 7:48 ` Petr Vorel
2022-03-11 14:43 ` Cyril Hrubis
2022-03-13 21:59 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6205F185.5080603@fujitsu.com \
--to=xuyang2018.jy@fujitsu.com \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox