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

Cyril Hrubis chrubis@suse.cz
Thu Aug 5 13:54:43 CEST 2021


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")");

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list