From: Leah Rumancik <leah.rumancik@gmail.com>
To: Eryu Guan <guan@eryu.me>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] ext4/309: add test for ext4_dir_entry2 wipe
Date: Mon, 17 May 2021 09:41:23 -0400 [thread overview]
Message-ID: <YKJyg/CM1pkZVNUK@google.com> (raw)
In-Reply-To: <YKFEHJUklppQuS7u@desktop>
On Mon, May 17, 2021 at 12:11:08AM +0800, Eryu Guan wrote:
> On Tue, May 04, 2021 at 07:34:25PM +0000, Leah Rumancik wrote:
> > From: Leah Rumancik <lrumancik@google.com>
> >
> > Check wiping of dir entry data upon removing a file, converting to an
> > htree, and splitting htree nodes.
> >
> > Tests commit 6c0912739699d8e4b6a87086401bf3ad3c59502d ("ext4: wipe
> > ext4_dir_entry2 upon file deletion").
> >
> > Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com>
> > ---
> > tests/ext4/309 | 193 +++++++++++++++++++++++++++++++++++++++++++++
> > tests/ext4/309.out | 5 ++
> > tests/ext4/group | 1 +
> > 3 files changed, 199 insertions(+)
> > create mode 100755 tests/ext4/309
> > create mode 100644 tests/ext4/309.out
> >
> > diff --git a/tests/ext4/309 b/tests/ext4/309
> > new file mode 100755
> > index 00000000..c46db688
> > --- /dev/null
> > +++ b/tests/ext4/309
> > @@ -0,0 +1,193 @@
> > +#!/bin/bash
> > +# SPDX-License-Identifier: GPL-2.0
> > +# Copyright (c) 2021 Google, Inc. All Rights Reserved.
> > +#
> > +# FS QA Test No. 309
> > +#
> > +# Test wiping of ext4_dir_entry2 data upon file removal, conversion
> > +# to htree, and splitting of htree nodes
> > +#
> > +seq=`basename $0`
> > +seqres=$RESULT_DIR/$seq
> > +echo "QA output created by $seq"
> > +
> > +status=1 # failure is the default!
> > +
> > +# get standard environment, filters and checks
> > +. ./common/rc
> > +. ./common/filter
> > +
> > +# remove previous $seqres.full before test
> > +rm -f $seqres.full
> > +
> > +# real QA test starts here
> > +_supported_fs ext4
> > +
> > +_require_scratch
> > +_require_dumpe2fs "$DUMPE2FS_PROG" dumpe2fs
> > +_require_command "$DEBUGFS_PROG" debugfs
> > +
> > +
> > +SCRATCH_DIR="${SCRATCH_MNT}/scratch_dir"
>
> SCRATCH_DIR could be easily confused with SCRATCH_MNT. 'testdir' with
> lower case variable name should be fine.
>
> > +
> > +# get block number filename's dir ent
> > +# argument 1: filename
> > +get_block() {
> > + echo $($DEBUGFS_PROG $SCRATCH_DEV -R "dirsearch /scratch_dir $1" 2>> $seqres.full | grep -o -m 1 "phys [0-9]\+" | cut -c 6-)
>
> Please use tab for indention.
>
> Thanks,
> Eryu
>
> > +_scratch_mkfs_sized $((128 * 1024 * 1024)) >> $seqres.full 2>&1
> > +blocksize=$($DUMPE2FS_PROG -h $SCRATCH_DEV 2>> $seqres.full | grep "Block size:" | cut -d ":" -f2 | tr -d " \t\n\r")
>
> How about doing "_get_block_size $SCRATCH_MNT" after _scratch_mount ?
>
Sure, this all sounds good. I'll send out an updated version.
Thanks,
Leah
prev parent reply other threads:[~2021-05-17 13:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 19:34 [PATCH] ext4/309: add test for ext4_dir_entry2 wipe Leah Rumancik
2021-05-16 16:11 ` Eryu Guan
2021-05-17 13:41 ` Leah Rumancik [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=YKJyg/CM1pkZVNUK@google.com \
--to=leah.rumancik@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=guan@eryu.me \
/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