[LTP] [PATCH] move_pages04: fix zero page status code for kernels >= 4.3

Jan Stancek jstancek@redhat.com
Thu Oct 6 09:24:45 CEST 2016





----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp@lists.linux.it
> Sent: Wednesday, 5 October, 2016 5:47:35 PM
> Subject: Re: [LTP] [PATCH] move_pages04: fix zero page status code for kernels >= 4.3
> 
> 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.

Pushed with your ack and suggested changes.

Regards,
Jan

> 
> --
> Cyril Hrubis
> chrubis@suse.cz
> 


More information about the ltp mailing list