On Tue, Mar 29, 2016 at 07:06:09PM +0800, "Zhou, Wenjian/周文剑" wrote:
> On 03/25/2016 06:48 AM, Dmitry V. Levin wrote:
> > On Wed, Mar 23, 2016 at 04:56:37PM +0800, Zhou Wenjian wrote:
> >> --- /dev/null
> >> +++ b/tests/option_u.test
> >> @@ -0,0 +1,13 @@
> >> +#!/bin/sh
> >> +
> >> +# Check option -u.
> >> +
> >> +. "${srcdir=.}/init.sh"
> >> +
> >> +user=$(tail -n 1 /etc/passwd | awk -F ":" '{print $1}')
> >
> > What is it?
> 
> It is used to get a user's name.
> Then use strace tracing "whoami".
> If -u option works, the output of "whoami" will be the user's name.

In other words, you tell strace to switch to a random user and then you
check whether it worked out or not.
Do you have to run the test as root to make it work as you've described?


-- 
ldv

Attachment: pgpvNlaNOfYLp.pgp
Description: PGP signature

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to