From: Zorro Lang <zlang@redhat.com>
To: fstests@vger.kernel.org
Subject: Re: [PATCH] generic/317: use id to get user id
Date: Sat, 24 Sep 2016 19:55:48 +0800 [thread overview]
Message-ID: <20160924115548.GC12847@dhcp12-143.nay.redhat.com> (raw)
In-Reply-To: <1474649676-31602-1-git-send-email-eguan@redhat.com>
On Sat, Sep 24, 2016 at 12:54:36AM +0800, Eryu Guan wrote:
> Greping username "fsgqa" in passwd file to get user id doesn't
> always work, because the given username could match multiple
> entries, e.g. when we have user "123456-fsgqa" (used by other tests)
> in passwd file.
>
> Fix it by using "id -u $qa_user" to get the user id directly.
>
> Signed-off-by: Eryu Guan <eguan@redhat.com>
> ---
> tests/generic/317 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/generic/317 b/tests/generic/317
> index 9d9499b..7e40b1f 100755
> --- a/tests/generic/317
> +++ b/tests/generic/317
> @@ -61,7 +61,7 @@ _require_scratch
> _require_user
> _require_ugid_map
> _require_userns
> -qa_user_id=`grep $qa_user /etc/passwd |awk -F: '{print $3}'`
> +qa_user_id=`id -u $qa_user`
Looks good to me.
Reviewed-by: Zorro Lang <zlang@redhat.com>
>
> _filter_output()
> {
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-09-24 11:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-23 16:54 [PATCH] generic/317: use id to get user id Eryu Guan
2016-09-24 11:55 ` Zorro Lang [this message]
2016-09-26 9:11 ` Anatoly Pugachev
2016-09-26 12:49 ` Eryu Guan
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=20160924115548.GC12847@dhcp12-143.nay.redhat.com \
--to=zlang@redhat.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