[PATCH 4/4] tests/fcntl.c: fix fcntl test on mips64

Dmitry V. Levin ldv at altlinux.org
Thu Aug 11 10:07:37 UTC 2016


On Thu, Aug 11, 2016 at 10:41:13AM +0100, James Cowgill wrote:
> On 11/08/16 03:33, Dmitry V. Levin wrote:
> > On Wed, Aug 10, 2016 at 11:38:45AM +0100, James Cowgill wrote:
> >> On mips64 the F_GETLK and F_SETLKW64 constants have identical values which
> >> causes the "wrong" constant to be printed by strace.
> >>
> >> tests/fcntl.c (test_flock64): do not test F_SETLKW64 on mips64.
> >> ---
> >>  tests/fcntl.c | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >> diff --git a/tests/fcntl.c b/tests/fcntl.c
> >> index 1ea83e1..a1f7fa7 100644
> >> --- a/tests/fcntl.c
> >> +++ b/tests/fcntl.c
> >> @@ -59,7 +59,10 @@ test_flock64(void)
> >>  #if !defined(F_GETOWN_EX) || F_GETOWN_EX != F_SETLK64
> >>  	TEST_FLOCK64_EINVAL(F_SETLK64);
> >>  #endif
> >> +/* F_GETLK and F_SETLKW64 have conflicting values on mips64 */
> >> +#if defined(__mips64) && F_GETLK != F_SETLKW64
> >>  	TEST_FLOCK64_EINVAL(F_SETLKW64);
> >> +#endif
> > 
> > Is this conflict mips64 only, or should we generalize it further?
> 
> I have no idea if it affects more than just mips64, but the check should
> be able to be removed. I also see that I've screwed up the defined check
> anyway (the test is always false). I can send a V2 patch without the
> check if you want.

According to kernel headers, this is specific to __mips64,
so let's just fix the ifdef check.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160811/e1dc859c/attachment.bin>


More information about the Strace-devel mailing list