From: "Darrick J. Wong" <djwong@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH 2/2] fstests: groupfile generation needs force overwrite
Date: Mon, 11 Oct 2021 09:36:18 -0700 [thread overview]
Message-ID: <20211011163618.GE24282@magnolia> (raw)
In-Reply-To: <20211010230659.216166-3-david@fromorbit.com>
On Mon, Oct 11, 2021 at 10:06:59AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> Having built fstests as root as part of a run script, I get failures
> then trying to run it as a user because of the group list
> generation. The issue occurs because the group list files are owned
> by root, and so I get an interactive prompt to overwrite them such
> as:
>
> Building btrfs
> [GROUP] /home/dave/src/xfstests-dev/tests/btrfs/group.list
> mv: replace 'group.list', overriding mode 0644 (rw-r--r--)? y
> Building ceph
> [GROUP] /home/dave/src/xfstests-dev/tests/ceph/group.list
> mv: replace 'group.list', overriding mode 0644 (rw-r--r--)? y
> Building cifs
> [GROUP] /home/dave/src/xfstests-dev/tests/cifs/group.list
> mv: replace 'group.list', overriding mode 0644 (rw-r--r--)? y
> Building ext4
> [GROUP] /home/dave/src/xfstests-dev/tests/ext4/group.list
> ...
>
> Use 'mv -f' to ignore such trivial issues so that the new group
> lists are written correctly.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
Oops, sorry I didn't catch this.
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> tools/mkgroupfile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/mkgroupfile b/tools/mkgroupfile
> index 634ec92c..3844e57d 100755
> --- a/tools/mkgroupfile
> +++ b/tools/mkgroupfile
> @@ -24,7 +24,7 @@ cleanup() {
> test -z "$ngroupfile" && return
>
> if [ $ret -eq 0 ]; then
> - mv "$ngroupfile" "$groupfile"
> + mv -f "$ngroupfile" "$groupfile"
> else
> rm -f "$ngroupfile"
> fi
> --
> 2.33.0
>
prev parent reply other threads:[~2021-10-11 16:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-10 23:06 fstests: fix build issues Dave Chinner
2021-10-10 23:06 ` [PATCH 1/2] fstests: autoconf has deprecated a bunch of macros Dave Chinner
2021-10-11 16:53 ` Darrick J. Wong
2021-10-10 23:06 ` [PATCH 2/2] fstests: groupfile generation needs force overwrite Dave Chinner
2021-10-11 16:36 ` Darrick J. Wong [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=20211011163618.GE24282@magnolia \
--to=djwong@kernel.org \
--cc=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
/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