[LTP] [PATCH] [1/6] syscalls/sysfs: Convert sysfs01 to the new API

sujiaxun sujiaxun@uniontech.com
Fri Aug 6 03:22:06 CEST 2021


Okay, thank you for your meticulous guidance, I will revise and submit 
it again according to your suggestions.

在 2021/8/5 下午7:54, Cyril Hrubis 写道:
> Hi!
>> +		TEST(tst_syscall(__NR_sysfs, 1, "proc"));
>>
>>   		/* check return code */
>> -		if (TEST_RETURN == -1) {
>> -			tst_resm(TFAIL, "sysfs(2) Failed for "
>> -				 "option 1 and set errno to %d", TEST_ERRNO);
>> +		if (TST_RET == -1) {
>> +			tst_res(TFAIL, "sysfs(2) Failed for "
>> +				 "option 1 and set errno to %d", TST_ERR);
>>   		} else {
>> -			tst_resm(TPASS, "sysfs(2) Passed for " "option 1");
>> +			tst_res(TPASS, "sysfs(2) Passed for " "option 1");
>>   		}
> 
> This could be just:
> 
> 	TST_EXP_POSSITIVE(tst_syscall(__NR_sysfs, 1, "proc"),
> 	                  "sysfs(1, "proc")");
> 

-- 
Kind regards,

sujiaxun




More information about the ltp mailing list