Linux Test Project
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/1] df01.sh: Fix DF_FS_TYPE assignment on bind mount
Date: Mon, 26 Apr 2021 20:59:05 +0200	[thread overview]
Message-ID: <YIcNeV0wbuK9wmPu@pevik> (raw)
In-Reply-To: <20210401124724.25394-1-pvorel@suse.cz>

Hi,

Merged this one.

Kind regards,
Petr

> In case of bind mount of testing directory, grep will assign filesystem
> twice, with new line:

> $ echo "DF_FS_TYPE: '$DF_FS_TYPE'"
> DF_FS_TYPE: 'ext2
> ext2'

> Limiting only first line to avoid failure with confusing message:

> df01 5 TFAIL: 'df' failed.
> df: ext2: No such file or directory

> +++ b/testcases/commands/df/df01.sh
> @@ -39,7 +39,7 @@ setup()
>  {
>  	tst_mkfs
>  	tst_mount
> -	DF_FS_TYPE=$(mount | grep "$TST_DEVICE" | awk '{print $5}')
> +	DF_FS_TYPE=$(mount | grep "$TST_DEVICE" | awk 'NR==1{print $5}')
>  }

>  df_test()

      reply	other threads:[~2021-04-26 18:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01 12:47 [LTP] [PATCH 1/1] df01.sh: Fix DF_FS_TYPE assignment on bind mount Petr Vorel
2021-04-26 18:59 ` Petr Vorel [this message]

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=YIcNeV0wbuK9wmPu@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /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