Please find a problem reported by Srinivas and then solution from Jose:

==========================================================================
---Problem Description---
==========================================================================
remap_file_pages(01/02) failing on 31(s390) bit linux guest running
RHEL4.6
 
Contact Information = Srinivasan Subramanian/[EMAIL PROTECTED]
 
---uname output---
Linux <snip> 2.6.9-61.EL #1 SMP Wed Oct 3 15:55:51 EDT
2007 s390 s390 s390 GNU/Linux
 
Machine Type = s390 - 31 bit

 
---Steps to Reproduce---
1) Untar and install the latest release of ltp test suite
2) Run the generic tests using, ./runltp -o out.txt -g out.html
3) Look out for the test output of remap_file_pages to observe the error

 
/etc/selinux/config output: 
SELINUX=enforcing
SELINUXTYPE=targeted
 
"rpm -qa | grep -i selinux" output: 
libselinux-1.19.1-7.4
selinux-policy-targeted-1.17.30-2.148
libselinux-devel-1.19.1-7.4

here is the output of the isolated run of remap_file_pages

[EMAIL PROTECTED] output]# cat LTP_RUN_ON-rempa.out.failed 
remap_file_pages01 remap_file_pages01
remap_file_pages02 remap_file_pages02

[EMAIL PROTECTED] output]# cat rempa.out 
<<<test_start>>>
tag=remap_file_pages01 stime=1199860368
cmdline="remap_file_pages01"
contacts=""
analysis=exit
initiation_status="ok"
<<<test_output>>>
remap_file_pages01    1  FAIL  :  remap_file_pages error for page=1207959552,
page_sz=8192, window_pages=14 (errno=38 : Function not implemented)
<<<execution_status>>>
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=5 cstime=1
<<<test_end>>>
<<<test_start>>>
tag=remap_file_pages02 stime=1199860368
cmdline="remap_file_pages02"
contacts=""
analysis=exit
initiation_status="ok"
<<<test_output>>>
remap_file_pages02    1  FAIL  :  remap_file_pages(2) failed to produce expected
error: 22, errno: EINVAL. because got error 38
remap_file_pages02    2  FAIL  :  remap_file_pages(2) failed to produce expected
error: 22, errno: EINVAL. because got error 38
remap_file_pages02    3  FAIL  :  remap_file_pages(2) failed to produce expected
error: 22, errno: EINVAL. because got error 38
remap_file_pages02    4  FAIL  :  remap_file_pages(2) failed to produce expected
error: 22, errno: EINVAL. because got error 38
remap_file_pages02    5  FAIL  :  remap_file_pages(2) failed to produce expected
error: 22, errno: EINVAL. because got error 38
incrementing stop
<<<execution_status>>>
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=1 cstime=0
<<<test_end>>>
==========================================================================
Ricardo´s comments:
==========================================================================
> Ricardo,
> here is the output of the isolated run of remap_file_pages
> 
> [EMAIL PROTECTED] output]# cat LTP_RUN_ON-rempa.out.failed 
> remap_file_pages01 remap_file_pages01
> remap_file_pages02 remap_file_pages02
> 
> [EMAIL PROTECTED] output]# cat rempa.out 
> <<<test_start>>>
> tag=remap_file_pages01 stime=1199860368
> cmdline="remap_file_pages01"
> contacts=""
> analysis=exit
> initiation_status="ok"
> <<<test_output>>>
> remap_file_pages01    1  FAIL  :  remap_file_pages error for page=1207959552,
> page_sz=8192, window_pages=14 (errno=38 : Function not implemented)
> <<<execution_status>>>
> duration=0 termination_type=exited termination_id=1 corefile=no
> cutime=5 cstime=1
> <<<test_end>>>

I'm thinking if this syscall is really implemented for s390, but I don't have
the rhel 4.6 kernel src here in my hands to check now.

Zeh, please see if this syscall is implemented for s390 for the kernel tested
(see at arch/kernel/syscalls.S), if not we have to create a patch for ltp to
abort this test if arch is s390.
==========================================================================
Jose Otavio Rizzatti Ferreira comments:
==========================================================================
Hello,

I've created a little patch for remap_file_pages01 and 02, which will check if
the machine is a s390(x) and the kernel version, before executing. Trusting the
comment Salina showed us, it will check if the kernel version is below 2.6.12.
If it's got a newer kernel, the test executes. It's working fine at the
submitter's machine.

Subrata, Ricardo, please let me know if there is something wrong with the
patch. 

Thank you.
==========================================================================
==========================================================================

--Subrata
Signed-off-by: Jose Otavio Rizzatti Ferreira <[EMAIL PROTECTED]> 
--- testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c.orig	2008-01-09 17:29:32.000000000 +0100
+++ testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c	2008-01-09 17:23:54.000000000 +0100
@@ -113,6 +113,16 @@
 	int lc;		/* loop counter */
 	char *msg;	/* message returned from parse_opts */
 
+#if defined (__s390__) || (__s390x__)
+	/* Disables the test in case the kernel version is lower than 2.6.12 and arch is s390 */
+	if((tst_kvercmp(2, 6, 12)) < 0)
+        {
+		tst_resm(TWARN, "This test can only run on kernels that are ");
+		tst_resm(TWARN, "2.6.12 and higher");
+		exit(0);
+	}
+#endif
+
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL) {
 		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
--- testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c.orig	2008-01-09 17:29:42.000000000 +0100
+++ testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c	2008-01-09 17:26:21.000000000 +0100
@@ -132,6 +132,16 @@
 	int lc, i;	/* loop counter */
 	char *msg;	/* message returned from parse_opts */
 
+#if defined (__s390__) || (__s390x__)
+        /* Disables the test in case the kernel version is lower than 2.6.12 and arch is s390 */
+        if((tst_kvercmp(2, 6, 12)) < 0)
+        {
+                tst_resm(TWARN, "This test can only run on kernels that are ");
+                tst_resm(TWARN, "2.6.12 and higher");
+                exit(0);
+        }
+#endif
+
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL))
 			!= (char *)NULL) {
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to