[LTP] [PATCH] syscalls/stime: Use 3 variants via test_multiplex()
Xiao Yang
yangx.jy@cn.fujitsu.com
Thu Mar 28 10:40:25 CET 2019
On 2019/03/28 14:52, Petr Vorel wrote:
> Hi Xiao,
>
>> diff --git a/testcases/kernel/syscalls/stime/stime01.c b/testcases/kernel/syscalls/stime/stime01.c
> ...
>> +static int do_stime(time_t *ntime)
>> +{
>> + switch (tst_variant) {
>> + case 0:
>> +#ifdef __ANDROID__
>> + tst_brk(TCONF, "libc stime() is not implemented for Android");
> IMHO this is not optimal. 1) That might change in the future, 2) Why not to fix
> it for other foo libc implementations, which might suffer the same problem.
> Therefore IMHO autotools check should be used.
>
Hi Petr,
Sorry, i pushed roughly. :-(
I have sent a patch set as you suggested, so could you help me review it?
Best Regards,
Xiao Yang
>> +#else
>> + return stime(ntime);
>> +#endif
>> + case 1:
>> + return tst_syscall(__NR_stime, ntime);
>> + case 2: {
>> + struct timeval tv;
>> +
>> + tv.tv_sec = *ntime;
>> + tv.tv_usec = 0;
>> +
>> + return tst_syscall(__NR_settimeofday,&tv, (struct timezone *) 0);
>> + }
>> + }
> Kind regards,
> Petr
>
>
>
More information about the ltp
mailing list