Thanks Randy. It's my first LTP patch, and I based it on other patches
I've seen. I'm attaching a corrected version.

On Fri, 2008-01-18 at 08:17 -0800, Randy Dunlap wrote:
> On Fri, 18 Jan 2008 18:03:45 +0530 Subrata Modak wrote:
> 
> > Please find a problem reported by Srinivas and then solution from Jose:
> 
> +#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");
> 
> I think that you shouldn't make that look like 2 warnings.
> I.e., don't split the message onto 2 lines.
> Same comment for this below also.
> 
> 
> +             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
> 
> ---
> ~Randy
Signed-off-by: Jose Otavio Rizzatti Ferreira <[EMAIL PROTECTED]> 
--- testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c.orig	2008-01-01 09:44:54.000000000 -0200
+++ testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c	2008-01-18 14:54:31.000000000 -0200
@@ -113,6 +113,15 @@
 	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 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-01 09:44:54.000000000 -0200
+++ testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c	2008-01-18 14:54:39.000000000 -0200
@@ -132,6 +132,15 @@
 	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 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