[LTP] [PATCH v1 2/2] syscalls/settimeofday02: convert to new library

Yang Xu xuyang2018.jy@cn.fujitsu.com
Mon Mar 9 08:52:12 CET 2020


Hi


> Hi Xu,
> 
>> +static void verify_settimeofday(unsigned int n)
> ...
>> +	struct tcase *tc = &tcases[n];
>> +
>> +	flag = 0;
>> +	tst_res(TINFO, "%s", tc->message);
>> +	TEST(settimeofday(&tc->tv, NULL));
>> +	if (TST_RET != -1) {
>> +		tst_res(TFAIL, "settimeofday() succeeded unexpectedly");
> Maybe add TTERRNO here as well?
Why? When run into here, settimeofyday succeeded unexpectedly, errno 
should be 0.

Best Regards
Yang Xu
>> +		flag = 1;
>> +		return;
> 
> Kind regards,
> Petr
> 
> 




More information about the ltp mailing list