[LTP] [PATCH 2/4] syscalls/modify_ldt: Replace TINFO with TPASS or TFAIL

zhaogongyi zhaogongyi@huawei.com
Thu May 6 13:23:35 CEST 2021


Hi,

I have reviewed the patch for some time, but I have not find the possible reason of it. Theoretically the patch didn't change the logic.

Because I have not the i386 machine, so I can't run it.

Best Regards,
Gongyi

> 
> Hi Petr,
> 
> Before my MR merged, the test case would not eixt a nozero value, is it
> the root cause of the problem?
> 
> >
> > Hi Zhao, Cyril,
> >
> > > diff --git a/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c
> > b/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c
> > ...
> > > @@ -149,15 +132,13 @@ int main(int ac, char **av)
> > >  		(void)waitpid(pid, &status, 0);
> >
> > >  		if (WEXITSTATUS(status) != 0) {
> > > -			flag = FAILED;
> > >  			tst_resm(TFAIL, "Did not generate SEGV, child returned "
> > >  				 "unexpected status");
> > > -		}
> > > -
> > > -		if (flag) {
> > > -			tst_resm(TINFO, "block 2 FAILED");
> > >  		} else {
> > > -			tst_resm(TINFO, "block 2 PASSED");
> > > +			if (WIFSIGNALED(status) && (WTERMSIG(status) ==
> SIGSEGV))
> > > +				tst_resm(TPASS, "generate SEGV as expected");
> > > +			else
> > > +				tst_resm(TFAIL, "Did not generate SEGV");
> > FYI: since merging this patch (f5e8e6b11) test fails on this. Is it
> expected?
> > I haven't looked closer whether it's a test bug or real issue.
> >
> > Kind regards,
> > Petr


More information about the ltp mailing list