This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[VxWorks] XFAIL strcmp and strncmp tests for kernel mode


execute/strcmp-1.c and execute/strncmp-1.c fail for VxWorks kernel
mode because the kernel versions of strcmp and strncmp perform
signed rather than unsigned comparisons.

Tested on i586-wrs-vxworks.  From previous testing, the same problem
is known to occur on MIPS, SH and SPARC.  OK to install?

Richard


gcc/testsuite/
	* gcc.c-torture/execute/strcmp-1.x: New file.  XFAIL execution
	for VxWorks kernel mode.
	* gcc.c-torture/execute/strncmp-1.x: Likewise.

Index: gcc/testsuite/gcc.c-torture/execute/strcmp-1.x
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/strcmp-1.x	(revision 0)
+++ gcc/testsuite/gcc.c-torture/execute/strcmp-1.x	(revision 0)
@@ -0,0 +1,16 @@
+if {[istarget i?86-*-vxworks*]
+    || [istarget mips*-*-vxworks*]
+    || [istarget sh*-*-vxworks*]
+    || [istarget sparc*-*-vxworks*]} {
+    # The kernel strcmp doesn't perform unsigned comparisons.
+    set torture_eval_before_execute {
+	global compiler_conditional_xfail_data
+	set compiler_conditional_xfail_data {
+	    "The kernel strcmp doesn't perform unsigned comparisons."
+	    { "*-*-*" }
+	    {}
+	    { "-mrtp" }
+	}
+    }
+}
+return 0
Index: gcc/testsuite/gcc.c-torture/execute/strncmp-1.x
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/strncmp-1.x	(revision 0)
+++ gcc/testsuite/gcc.c-torture/execute/strncmp-1.x	(revision 0)
@@ -0,0 +1,16 @@
+if {[istarget i?86-*-vxworks*]
+    || [istarget mips*-*-vxworks*]
+    || [istarget sh*-*-vxworks*]
+    || [istarget sparc*-*-vxworks*]} {
+    # The kernel strncmp doesn't perform unsigned comparisons.
+    set torture_eval_before_execute {
+	global compiler_conditional_xfail_data
+	set compiler_conditional_xfail_data {
+	    "The kernel strncmp doesn't perform unsigned comparisons."
+	    { "*-*-*" }
+	    {}
+	    { "-mrtp" }
+	}
+    }
+}
+return 0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]