From: Eryu Guan Date: Fri, 23 Sep 2016 15:32:27 +0000 (+0800) Subject: generic/317: use id to get user id X-Git-Tag: v2022.05.01~2347 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dc913dcfcb989454185ccf579b2e7c8c52636499;p=xfstests-dev.git generic/317: use id to get user id 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. Reviewed-by: Zorro Lang Signed-off-by: Eryu Guan --- diff --git a/tests/generic/317 b/tests/generic/317 index 9d9499ba..7e40b1fd 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` _filter_output() {