xfs
[Top] [All Lists]

Re: [PATCH] xfstests: check if qa user can execute commands

To: Jan Schmidt <list.btrfs@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfstests: check if qa user can execute commands
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 6 Dec 2011 10:13:00 -0500
Cc: linux-btrfs@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <1323165389-5419-1-git-send-email-list.btrfs@xxxxxxxxxxxxx>
References: <1323165389-5419-1-git-send-email-list.btrfs@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Dec 06, 2011 at 10:56:29AM +0100, Jan Schmidt wrote:
> _require_user only checks if the qa user exists in /etc/passwd. It may exist
> though still not be able to execute anything (e.g. with a /bin/false shell).
> 
> _user_do cannot determine failure to execute the given command, as it uses
> _user_do_filter for post-processing which succeeds even if the command
> fails. Thus, the check should be performed by _require_user.

Looks good.  Wouldn't

        su $qa_user -c /bin/true

be the more normal way to write that test?

<Prev in Thread] Current Thread [Next in Thread>