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 <zlang@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Eryu Guan
2016-09-23 23:32:27 +08:00
parent 0bbd20b104
commit dc913dcfcb
+1 -1
View File
@@ -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()
{