[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] Fix tst-setcontext for getcontext returning ENOSYS



I've applied to trunk and 2.8 branch this patch to fix the tst-setcontext 
test for the case when getcontext returns ENOSYS.  It's meant to return 0 
in this case - but the atexit handler gives an error unless back_in_main 
is set.

Index: stdlib/tst-setcontext.c
===================================================================
--- stdlib/tst-setcontext.c	(revision 6380)
+++ stdlib/tst-setcontext.c	(working copy)
@@ -150,7 +150,10 @@
   if (getcontext (&ctx[1]) != 0)
     {
       if (errno == ENOSYS)
-	exit (0);
+	{
+	  back_in_main = 1;
+	  exit (0);
+	}
 
       printf ("%s: getcontext: %m\n", __FUNCTION__);
       exit (1);
Index: ChangeLog.eglibc
===================================================================
--- ChangeLog.eglibc	(revision 6380)
+++ ChangeLog.eglibc	(working copy)
@@ -1,3 +1,8 @@
+2008-06-17  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* stdlib/tst-setcontext.c: Set back_in_main before exit if
+	getcontext returns ENOSYS.
+
 2008-05-15  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* posix/globtest.sh: Set HOME with env on test target system.

-- 
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx