Linux MIPS Architecture development
 help / color / mirror / Atom feed
* LTP testing
@ 2002-06-25  9:59 Carsten Langgaard
  2002-06-25 12:07 ` Maciej W. Rozycki
  0 siblings, 1 reply; 13+ messages in thread
From: Carsten Langgaard @ 2002-06-25  9:59 UTC (permalink / raw)
  To: Ralf Baechle, linux-mips@oss.sgi.com

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

The LTP test fails with:
msgctl01    1  FAIL  :  qs_buf.msg_qbytes did not change
msgctl02    1  FAIL  :  qs_buf.msg_qbytes value is not expected
msgsnd01    1  FAIL  :  queue bytes != MSGSIZE
msgsnd01    2  FAIL  :  queue message != 1

All the above failures is fixed by the attached patch.
The msgbuf.h file is now a copy from i386, instead of alpha.
I guess the fix goes for 64-bit kernel as well.

/Carsten



--
_    _ ____  ___   Carsten Langgaard   Mailto:carstenl@mips.com
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com



[-- Attachment #2: msgbuf.patch --]
[-- Type: text/plain, Size: 1491 bytes --]

Index: include/asm-mips/msgbuf.h
===================================================================
RCS file: /home/repository/sw/linux-2.4.18/include/asm-mips/msgbuf.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 msgbuf.h
--- include/asm-mips/msgbuf.h	4 Mar 2002 11:13:24 -0000	1.1.1.1
+++ include/asm-mips/msgbuf.h	25 Jun 2002 09:30:03 -0000
@@ -2,26 +2,30 @@
 #define _ASM_MSGBUF_H
 
 /* 
- * The msqid64_ds structure for alpha architecture.
+ * The msqid64_ds structure for i386 architecture.
  * Note extra padding because this structure is passed back and forth
  * between kernel and user space.
  *
  * Pad space is left for:
- * - 2 miscellaneous 64-bit values
+ * - 64-bit time_t to solve y2038 problem
+ * - 2 miscellaneous 32-bit values
  */
 
 struct msqid64_ds {
 	struct ipc64_perm msg_perm;
 	__kernel_time_t msg_stime;	/* last msgsnd time */
+	unsigned long	__unused1;
 	__kernel_time_t msg_rtime;	/* last msgrcv time */
+	unsigned long	__unused2;
 	__kernel_time_t msg_ctime;	/* last change time */
+	unsigned long	__unused3;
 	unsigned long  msg_cbytes;	/* current number of bytes on queue */
 	unsigned long  msg_qnum;	/* number of messages in queue */
 	unsigned long  msg_qbytes;	/* max number of bytes on queue */
 	__kernel_pid_t msg_lspid;	/* pid of last msgsnd */
 	__kernel_pid_t msg_lrpid;	/* last receive pid */
-	unsigned long  __unused1;
-	unsigned long  __unused2;
+	unsigned long  __unused4;
+	unsigned long  __unused5;
 };
 
 #endif /* _ASM_MSGBUF_H */

^ permalink raw reply	[flat|nested] 13+ messages in thread
* LTP testing
@ 2002-06-25 13:21 Carsten Langgaard
  2002-06-25 13:53 ` Maciej W. Rozycki
  2002-06-25 14:39 ` Ralf Baechle
  0 siblings, 2 replies; 13+ messages in thread
From: Carsten Langgaard @ 2002-06-25 13:21 UTC (permalink / raw)
  To: Ralf Baechle, linux-mips@oss.sgi.com

The next LTP failure line is:
pipe05      1  BROK  :  Unexpected signal 11 received.

For this one I haven't got a fix, because the failure is due to the way
the pipe syscall is implemented for MIPS (so we need a fix in both the
kernel and glibc).

The glibc code look like this
SYSCALL__ (pipe, 1)
        /* Plop in the two descriptors.  */
        sw v0, 0(a0)
        sw v1, 4(a0)

        /* Go out with a clean status.  */
        move v0, zero
        j ra
        .end __pipe

The problem is that the code is called with $a0 = 0. So the 'sw v0,
0(a0)' after the syscall generates a segmentation fault.
Why are the pipe syscall implemented this way, where we return the two
descriptors in v0 and v1 ?
Why doesn't the kernel do these stores (this way we can do an access
check, like i386 does) ?

/Carsten


--
_    _ ____  ___   Carsten Langgaard   Mailto:carstenl@mips.com
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com

^ permalink raw reply	[flat|nested] 13+ messages in thread
* LTP testing
@ 2002-06-25 10:47 Carsten Langgaard
  0 siblings, 0 replies; 13+ messages in thread
From: Carsten Langgaard @ 2002-06-25 10:47 UTC (permalink / raw)
  To: Ralf Baechle, linux-mips@oss.sgi.com

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

The next LTP failure is:
msync05     1  FAIL  :  msync() fails, unexpected errno:14, expected:
ENOMEM

This has also been fixed in the 2.4.19-pre4 patch.
See the attached patch below.

/Carsten



--
_    _ ____  ___   Carsten Langgaard   Mailto:carstenl@mips.com
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com



[-- Attachment #2: filemap.patch --]
[-- Type: text/plain, Size: 902 bytes --]

Index: mm/filemap.c
===================================================================
RCS file: /home/repository/sw/linux-2.4.18/mm/filemap.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 filemap.c
--- mm/filemap.c	4 Mar 2002 11:13:34 -0000	1.1.1.1
+++ mm/filemap.c	25 Jun 2002 10:36:12 -0000
@@ -2179,18 +2179,18 @@
 		goto out;
 	/*
 	 * If the interval [start,end) covers some unmapped address ranges,
-	 * just ignore them, but return -EFAULT at the end.
+	 * just ignore them, but return -ENOMEM at the end.
 	 */
 	vma = find_vma(current->mm, start);
 	unmapped_error = 0;
 	for (;;) {
 		/* Still start < end. */
-		error = -EFAULT;
+		error = -ENOMEM;
 		if (!vma)
 			goto out;
 		/* Here start < vma->vm_end. */
 		if (start < vma->vm_start) {
-			unmapped_error = -EFAULT;
+			unmapped_error = -ENOMEM;
 			start = vma->vm_start;
 		}
 		/* Here vma->vm_start <= start < vma->vm_end. */

^ permalink raw reply	[flat|nested] 13+ messages in thread
* LTP testing
@ 2002-06-25  7:15 Carsten Langgaard
  2002-06-25 13:59 ` Ralf Baechle
  0 siblings, 1 reply; 13+ messages in thread
From: Carsten Langgaard @ 2002-06-25  7:15 UTC (permalink / raw)
  To: Ralf Baechle, linux-mips@oss.sgi.com

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

The next LTP failure is:
mprotect01    1  FAIL  :  unexpected error - 14 : Bad address - expected
12

This has been fixed in the 2.4.19-pre4 patch.
But here is a local patch that solve the above problem, so we can have
this fixed before we have merged with kernel.org.

/Carsten


--
_    _ ____  ___   Carsten Langgaard   Mailto:carstenl@mips.com
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com



[-- Attachment #2: mprotect.patch --]
[-- Type: text/plain, Size: 661 bytes --]

Index: mm/mprotect.c
===================================================================
RCS file: /home/repository/sw/linux-2.4.18/mm/mprotect.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 mprotect.c
--- mm/mprotect.c	4 Mar 2002 11:13:35 -0000	1.1.1.1
+++ mm/mprotect.c	25 Jun 2002 07:00:55 -0000
@@ -284,7 +284,7 @@
 	down_write(&current->mm->mmap_sem);
 
 	vma = find_vma_prev(current->mm, start, &prev);
-	error = -EFAULT;
+	error = -ENOMEM;
 	if (!vma || vma->vm_start > start)
 		goto out;
 
@@ -317,7 +317,7 @@
 		nstart = tmp;
 		vma = next;
 		if (!vma || vma->vm_start != nstart) {
-			error = -EFAULT;
+			error = -ENOMEM;
 			goto out;
 		}
 	}

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2002-06-25 15:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-25  9:59 LTP testing Carsten Langgaard
2002-06-25 12:07 ` Maciej W. Rozycki
  -- strict thread matches above, loose matches on Subject: below --
2002-06-25 13:21 Carsten Langgaard
2002-06-25 13:53 ` Maciej W. Rozycki
2002-06-25 14:18   ` Carsten Langgaard
2002-06-25 14:56     ` Maciej W. Rozycki
2002-06-25 15:06       ` Carsten Langgaard
2002-06-25 15:28         ` Ralf Baechle
2002-06-25 14:28   ` Johannes Stezenbach
2002-06-25 14:39 ` Ralf Baechle
2002-06-25 10:47 Carsten Langgaard
2002-06-25  7:15 Carsten Langgaard
2002-06-25 13:59 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox