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. >> >> tests/fcntl.c (test_flock64): do not test F_SETLKW64

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 >> input argument is treated as an un

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 >> timestamp before 1970 with futime

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

2016-08-11 Thread Dmitry V. Levin
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 printe

Re: [PATCH 3/4] Introduce syscall fault injection feature

2016-08-11 Thread Nahim El Atmani
On Thu, 11 Aug 2016 05:42:52 +0300, Dmitry V. Levin wrote: > Date: Thu, 11 Aug 2016 05:42:52 +0300 > From: "Dmitry V. Levin" > To: strace-devel@lists.sourceforge.net > Subject: Re: [PATCH 3/4] Introduce syscall fault injection feature > Message-ID: <20160811024252.ge22...@altlinux.org> > In-Reply-

Re: [PATCH 3/4] Introduce syscall fault injection feature

2016-08-11 Thread Dmitry V. Levin
On Thu, Aug 11, 2016 at 04:17:41PM +0200, Nahim El Atmani wrote: > On Thu, 11 Aug 2016 05:42:52 +0300, Dmitry V. Levin wrote: [...] > > > > > --- a/syscall.c > > > > > +++ b/syscall.c > > > > > @@ -266,6 +266,14 @@ enum { > > > > > MIN_QUALS = MAX_NSYSCALLS > 255 ? MAX_NSYSCALLS : 255 > > > >

Re: [PATCH 3/4] Introduce syscall fault injection feature

2016-08-11 Thread Nahim El Atmani
On Thu, 11 Aug 2016 17:32:51 +0300, Dmitry V. Levin wrote: > Date: Thu, 11 Aug 2016 17:32:51 +0300 > From: "Dmitry V. Levin" > To: strace-devel@lists.sourceforge.net > Subject: Re: [PATCH 3/4] Introduce syscall fault injection feature > Message-ID: <20160811143251.ga30...@altlinux.org> > In-Reply-

Re: [PATCH 3/4] Introduce syscall fault injection feature

2016-08-11 Thread Dmitry V. Levin
On Thu, Aug 11, 2016 at 04:40:31PM +0200, Nahim El Atmani wrote: [...] > > > The thing is this time I need a copy of the global sparse array by tcb. I > > > was > > > I don't see why one may need a sparse array by tcb. > > > There has to be a global sparse array that fully describes fault inject

Re: [PATCH 3/4] Introduce syscall fault injection feature

2016-08-11 Thread Nahim El Atmani
On Thu, 11 Aug 2016 17:57:27 +0300, Dmitry V. Levin wrote: > Date: Thu, 11 Aug 2016 17:57:27 +0300 > From: "Dmitry V. Levin" > To: strace-devel@lists.sourceforge.net > Subject: Re: [PATCH 3/4] Introduce syscall fault injection feature > Message-ID: <20160811145727.gb30...@altlinux.org> > In-Reply-

[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
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 the testsuite. An example of the failures can be seen here: https://buildd.debian.org/status/fetch.php?pkg=strace&arch=mips64el&ver=4.12-3&stamp=

Re: [PATCH 3/4] Introduce syscall fault injection feature

2016-08-11 Thread Dmitry V. Levin
On Thu, Aug 11, 2016 at 05:51:07PM +0200, Nahim El Atmani wrote: [...] > Ok, let's take a small example to see why neither letting the accounting > information in a global scope nor letting the flag as it in the tcp does work. > If we have two tracees, and we want to cancel the second write *each*

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

2016-08-11 Thread Dmitry V. Levin
On Thu, Aug 11, 2016 at 04:33:00PM +, 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 > the testsuite. > > An example of the failures can be seen here: > https://bu