public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>, Xiong Zhou <xzhou@redhat.com>,
	linux-unionfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH v2 4/6] overlay/017: create helpers to record and check inode numbers
Date: Fri, 28 Apr 2017 17:24:02 +0800	[thread overview]
Message-ID: <20170428092402.GQ26397@eguan.usersys.redhat.com> (raw)
In-Reply-To: <1493367888-26550-5-git-send-email-amir73il@gmail.com>

On Fri, Apr 28, 2017 at 11:24:46AM +0300, Amir Goldstein wrote:
> Use helpers to records and check inode numbers so we can repeat
> the same test after rename and mount cycle.
> 
> Suggested-by: Eryu Guan <eguan@redhat.com>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
>  tests/overlay/017 | 57 ++++++++++++++++++++++++++++++++++++++++---------------
>  1 file changed, 42 insertions(+), 15 deletions(-)
> 
> diff --git a/tests/overlay/017 b/tests/overlay/017
> index 779907d..3ff429f 100755
> --- a/tests/overlay/017
> +++ b/tests/overlay/017
> @@ -72,32 +72,59 @@ mknod $lowerdir/blkdev b 1 1
>  mknod $lowerdir/fifo p
>  $here/src/af_unix $lowerdir/socket
>  
> +FILES="dir file symlink chrdev blkdev fifo socket"
> +
> +# Record inode numbers in format <ino> <basename>
> +function record_inode_numbers()
> +{
> +	dir=$1
> +	outfile=$2
> +
> +	for f in $FILES; do
> +		ls -id $dir/$f
> +	done | \
> +	while read ino file; do
> +		echo $ino `basename $file` >> $outfile
> +	done
> +}
> +
> +# Check inode numbers match recorder inode numbers
> +function check_inode_numbers()
> +{
> +	dir=$1
> +	before=$2
> +	after=$2
             ^^^ $3
Otherwise looks good to me. I can fix this typo at commit time.

But I've already kicked off release testing for this week's update,
I'll queue these patches for next update.

Thanks,
Eryu

  reply	other threads:[~2017-04-28  9:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-28  8:24 [PATCH v2 0/6] fstests: more tests for overlay constant inode numbers Amir Goldstein
2017-04-28  8:24 ` [PATCH v2 1/6] overlay/017: silence test output Amir Goldstein
2017-04-28  8:24 ` [PATCH v2 2/6] overlay/017: fix some comments Amir Goldstein
2017-04-28  8:24 ` [PATCH v2 3/6] overlay/017: use af_unix to create socket test file Amir Goldstein
2017-04-28  8:24 ` [PATCH v2 4/6] overlay/017: create helpers to record and check inode numbers Amir Goldstein
2017-04-28  9:24   ` Eryu Guan [this message]
2017-04-28 10:04     ` Amir Goldstein
2017-04-28 10:53       ` Amir Goldstein
2017-04-28  8:24 ` [PATCH v2 5/6] overlay/017: verify constant inode number after rename Amir Goldstein
2017-04-28  8:24 ` [PATCH v2 6/6] overlay/017: test persistent inode numbers after mount cycle Amir Goldstein

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=20170428092402.GQ26397@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=xzhou@redhat.com \
    /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