[LTP] [PATCH] move_pages04: fix zero page status code for kernels >= 4.3
Cyril Hrubis
chrubis@suse.cz
Wed Oct 5 17:47:35 CEST 2016
Hi!
> - if (status[UNTOUCHED_PAGE] == -ENOENT)
> - tst_resm(TPASS, "status[%d] set to expected -ENOENT",
> + if (status[UNTOUCHED_PAGE] == exp_status)
> + tst_resm(TPASS, "status[%d] has expected value",
> UNTOUCHED_PAGE);
> else
> - tst_resm(TFAIL, "status[%d] is %d", UNTOUCHED_PAGE,
> - status[UNTOUCHED_PAGE]);
> + tst_resm(TFAIL, "status[%d] is %d, expected %d",
> + UNTOUCHED_PAGE, status[UNTOUCHED_PAGE],
> + exp_status);
It would be a bit better to print the errno with tst_strerrno() in both
cases. I.e. tst_strerrno(-exp_status) and
tst_strerrno(-status[UNTOUCHED_PAGE]) otherwise this looks obviously
fine.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list