[PATCH 2/4] tests: add option_u.test
"Zhou, Wenjian/周文剑"
zhouwj-fnst at cn.fujitsu.com
Tue Mar 29 11:06:09 UTC 2016
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.
>> +OUT="$LOG.out"
>> +run_prog whoami
>> +run_strace -u $user $args > "$OUT"
>
> Really?
>
>> +echo $user > "$LOG"
>> +match_diff "$LOG" "$OUT"
>
> Does it have anything to do with strace?
>
>
Why isn't it -u option's work?
--
Thanks
Zhou
>
>
> ------------------------------------------------------------------------------
> 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=278785351&iu=/4140
>
>
>
> _______________________________________________
> Strace-devel mailing list
> Strace-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/strace-devel
>
More information about the Strace-devel
mailing list