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

2016-08-10 Thread James Cowgill
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 in

[PATCH 2/4] tests/xstatx.c: fix stat syscall tests on mips64

2016-08-10 Thread James Cowgill
For historical reasons the kernel struct stat represents times as unsigned 32-bit integers on mips64. Therefore, while it's possible to give a file a timestamp before 1970 with futimens, reading the same timestamp through struct stat will give a positive time (around 2106). Workaround by using posi

[PATCH 3/4] tests/nsyscalls.test: only trace the "syscall" syscall on mips o32

2016-08-10 Thread James Cowgill
The "syscall" syscall only exists on o32 and causes strace to error out on 64-bit mips ABIs. Pass st_cv_mips_abi from the configure script through to nsyscalls.test so the MIPS ABI can be checked. * configure.ac (st_cv_mips_abi): substitute into output files. * tests/Makefile.am (STRACE_ARCH_MIPS_

[PATCH 0/4] Testsuite fixes for mips64

2016-08-10 Thread James Cowgill
r=4.12-3&stamp=1468671031 The only test which still seems to fail on my machine is the "pwritev" test, but I believe that's caused by a kernel bug (which I haven't tracked down yet). Thanks, James James Cowgill (4): tests/mlock2.c: fix test failure on mips64 tests/xst

[PATCH 1/4] tests/mlock2.c: fix test failure on mips64

2016-08-10 Thread James Cowgill
In tests/mlock2.c, the address argument for the mlock2 syscall is passed through a vararg using the "syscall" function. On 64-bit systems, while the input argument is treated as an unsigned int, the argument is read as a void* (64-bits wide). On mips64, writes to the lower 32-bits of a register are

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

2016-08-11 Thread James Cowgill
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. >> >> test

Re: [PATCH 1/4] tests/mlock2.c: fix test failure on mips64

2016-08-11 Thread James Cowgill
On 11/08/16 03:14, Dmitry V. Levin wrote: > On Wed, Aug 10, 2016 at 11:38:42AM +0100, James Cowgill wrote: >> In tests/mlock2.c, the address argument for the mlock2 syscall is passed >> through a vararg using the "syscall" function. On 64-bit systems, while the >>

Re: [PATCH 2/4] tests/xstatx.c: fix stat syscall tests on mips64

2016-08-11 Thread James Cowgill
On 11/08/16 03:24, Dmitry V. Levin wrote: > On Wed, Aug 10, 2016 at 11:38:43AM +0100, James Cowgill wrote: >> For historical reasons the kernel struct stat represents times as unsigned >> 32-bit integers on mips64. Therefore, while it's possible to give a file a >>

[PATCH v2 1/3] tests/xstatx.c: fix stat syscall tests on mips64

2016-08-11 Thread James Cowgill
For historical reasons the kernel struct stat represents times as unsigned 32-bit integers on mips64. Therefore, while it's possible to give a file a timestamp before 1970 with futimens, reading the same timestamp through struct stat will give a positive time (around 2106). Workaround by using posi

[PATCH v2 2/3] tests/nsyscalls.test: only trace the "syscall" syscall on mips o32

2016-08-11 Thread James Cowgill
The "syscall" syscall only exists on o32 and causes strace to error out on 64-bit mips ABIs. Pass MIPS_ABI from the configure script through to nsyscalls.test so the MIPS ABI can be checked. * configure.ac (MIPS_ABI): substitute into output files. * tests/Makefile.am (MIPS_ABI): export via AM_TEST

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

2016-08-11 Thread James Cowgill
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 in

[PATCH v2 0/3] Testsuite fixes for mips64

2016-08-11 Thread James Cowgill
est: substitude MIPS_ABI instead of st_cv_mips_abi - tests/fcntl.c: fix ifdef James Cowgill (3): tests/xstatx.c: fix stat syscall tests on mips64 tests/nsyscalls.test: only trace the "syscall" syscall on mips o32 tests/fcntl.c: fix fcntl test on mips64 configure.ac | 3 +++

Re: [PATCH v2 0/3] Testsuite fixes for mips64

2016-08-12 Thread James Cowgill
Hi, On 11/08/16 22:08, Dmitry V. Levin wrote: > On Thu, Aug 11, 2016 at 04:33:00PM +0000, James Cowgill wrote: >> These patches fix most of the testsuite failures which happen on 64-bit mips >> (n32 and n64). None of the failures were bugs in strace, but rather bugs in >> th

Re: strace 4.15 released

2017-01-03 Thread James Cowgill
st has failed to SKIP on this target. >> >> As I'm not 100% sure there is no kernel support for mips, I decided >> not to skip the test on mips until somebody investigates. > > Ah, OK. James Cowgill is my friendly local mips expert - let's see > what he thinks...

Re: strace 4.15 released

2017-01-09 Thread James Cowgill
Hi, On 06/01/17 00:51, Dmitry V. Levin wrote: > On Tue, Jan 03, 2017 at 06:02:44PM +0000, James Cowgill wrote: >> On 20/12/16 00:36, Steve McIntyre wrote: >>> On Tue, Dec 20, 2016 at 03:16:17AM +0300, Dmitry V. Levin wrote: >>>> On Tue, Dec 20, 2016 at 12:50:29A

[PATCH] Use syscall instead of the glibc wrapper to call fstatat

2017-01-11 Thread James Cowgill
The newfstatat testcase on mips64 currently fails because: - The BOGUS_STRUCT_STAT test segfaults inside glibc. - The result of the fstatat call gives incorrect dates because the kernel struct stat uses unsigned int timestamps. Fix by using avoiding the glibc wrapper and using the relevant sysca

Re: strace 4.15 released

2017-02-13 Thread James Cowgill
Hi, On 13/02/17 14:40, Dmitry V. Levin wrote: > On Mon, Jan 09, 2017 at 08:54:52PM +0300, Dmitry V. Levin wrote: >> On Mon, Jan 09, 2017 at 05:31:37PM +0000, James Cowgill wrote: >>> On 06/01/17 00:51, Dmitry V. Levin wrote: >>>> On Tue, Jan 03, 2017 at 06:02:4

Re: strace 4.15 released

2017-02-14 Thread James Cowgill
Hi, On 14/02/17 09:27, Dmitry V. Levin wrote: > On Mon, Feb 13, 2017 at 04:47:05PM +0000, James Cowgill wrote: >> On 13/02/17 14:40, Dmitry V. Levin wrote: >>> On Mon, Jan 09, 2017 at 08:54:52PM +0300, Dmitry V. Levin wrote: >>>> On Mon, Jan 09, 2017 at 05:31:3