On Wed, 20 Nov 2013, Ilya Enkovich wrote:
> 2013/11/20 Joseph S. Myers <[email protected]>:
> > On Wed, 20 Nov 2013, Ilya Enkovich wrote:
> >
> >> Here is a patch to add MPX tests.
> >
> > I don't think these should be under gcc.target/i386; gcc.dg/mpx would be
> > better, so if someone adds a corresponding feature for another target,
> > they don't need to move all the tests around.
>
> All tests use target specific option -mmpx. Shouldn't it go into
> target tests then?
No, they should use { dg-add-options mpx } (well, both the directory name
and the dg-add-options argument should use whatever generic name for this
functionality we ended up with, rather than the name for the particular
instance of it on x86, so say gcc.dg/chkp and dg-add-options chkp). The
add_options_for_chkp function should then check the target and add the
appropriate options depending on the target.
> > Anything added that's XFAILed should have a comment explaining the reason
> > for the XFAILing (a reference to a bug in GCC Bugzilla is a good idea,
> > with that bug then mentioning the particular test that indicates whether
> > the bug is still present).
>
> Tests fail not due to the bug but because these tests should fail. It
> would mean bound violation was detected.
If a bound violation should be detected, the test should PASS when it's
detected and FAIL when it's not, rather than XFAILing and XPASSing.
Hopefully dg-shouldfail will do the right thing (causing an error exit
status from the test to mean PASS and a success status to mean FAIL).
--
Joseph S. Myers
[email protected]