public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Also check si_code == SI_MESGQ in tst-mqueue5
@ 2004-04-15  4:02 Jakub Jelinek
  2004-04-16 19:46 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2004-04-15  4:02 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

Hi!

Tought it would be better to check this as well...

2004-04-15  Jakub Jelinek  <jakub@redhat.com>

	* rt/tst-mqueue5.c (rtmin_code): New variable.
	(rtmin_handler): Set it.
	(thr, do_child, do_test): Also check rtmin_code.

--- libc/rt/tst-mqueue5.c.jj	2004-04-13 16:20:39.000000000 +0200
+++ libc/rt/tst-mqueue5.c	2004-04-15 00:15:33.922186683 +0200
@@ -42,6 +42,7 @@
 volatile int rtmin_cnt;
 volatile pid_t rtmin_pid;
 volatile uid_t rtmin_uid;
+volatile int rtmin_code;
 volatile union sigval rtmin_sigval;
 
 static void
@@ -52,6 +53,7 @@ rtmin_handler (int sig, siginfo_t *info,
   ++rtmin_cnt;
   rtmin_pid = info->si_pid;
   rtmin_uid = info->si_uid;
+  rtmin_code = info->si_code;
   rtmin_sigval = info->si_value;
 }
 
@@ -120,11 +122,12 @@ thr (void *arg)
     }
   else if (rtmin_pid != getppid ()
 	   || rtmin_uid != getuid ()
+	   || rtmin_code != SI_MESGQ
 	   || rtmin_sigval.sival_int != 0xdeadbeef)
     {
-      printf ("unexpected siginfo_t fields: pid %u (%u), uid %u (%u), si_int %d (%d)\n",
+      printf ("unexpected siginfo_t fields: pid %u (%u), uid %u (%u), code %d (%d), si_int %d (%d)\n",
 	      rtmin_pid, getppid (), rtmin_uid, getuid (),
-	      rtmin_sigval.sival_int, 0xdeadbeef);
+	      rtmin_code, SI_MESGQ, rtmin_sigval.sival_int, 0xdeadbeef);
       result = 1;
     }
 
@@ -286,11 +289,12 @@ do_child (const char *name, pthread_barr
     }
   else if (rtmin_pid != getppid ()
 	   || rtmin_uid != getuid ()
+	   || rtmin_code != SI_MESGQ
 	   || rtmin_sigval.sival_ptr != &ev)
     {
-      printf ("unexpected siginfo_t fields: pid %u (%u), uid %u (%u), si_ptr %p (%p)\n",
+      printf ("unexpected siginfo_t fields: pid %u (%u), uid %u (%u), code %d (%d), si_ptr %p (%p)\n",
 	      rtmin_pid, getppid (), rtmin_uid, getuid (),
-	      rtmin_sigval.sival_ptr, &ev);
+	      rtmin_code, SI_MESGQ, rtmin_sigval.sival_ptr, &ev);
       result = 1;
     }
 
@@ -704,11 +708,12 @@ do_test (void)
     }
   else if (rtmin_pid != getpid ()
 	   || rtmin_uid != getuid ()
+	   || rtmin_code != SI_MESGQ
 	   || rtmin_sigval.sival_int != 26)
     {
-      printf ("unexpected siginfo_t fields: pid %u (%u), uid %u (%u), si_int %d (26)\n",
+      printf ("unexpected siginfo_t fields: pid %u (%u), uid %u (%u), code %d (%d), si_int %d (26)\n",
 	      rtmin_pid, getpid (), rtmin_uid, getuid (),
-	      rtmin_sigval.sival_int);
+	      rtmin_code, SI_MESGQ, rtmin_sigval.sival_int);
       result = 1;
     }
 
@@ -807,11 +812,12 @@ do_test (void)
     }
   else if (rtmin_pid != pid
 	   || rtmin_uid != getuid ()
+	   || rtmin_code != SI_MESGQ
 	   || rtmin_sigval.sival_int != 15)
     {
-      printf ("unexpected siginfo_t fields: pid %u (%u), uid %u (%u), si_int %d (15)\n",
+      printf ("unexpected siginfo_t fields: pid %u (%u), uid %u (%u), code %d (%d), si_int %d (15)\n",
 	      rtmin_pid, pid, rtmin_uid, getuid (),
-	      rtmin_sigval.sival_int);
+	      rtmin_code, SI_MESGQ, rtmin_sigval.sival_int);
       result = 1;
     }
 

	Jakub

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

* Re: [PATCH] Also check si_code == SI_MESGQ in tst-mqueue5
  2004-04-15  4:02 [PATCH] Also check si_code == SI_MESGQ in tst-mqueue5 Jakub Jelinek
@ 2004-04-16 19:46 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2004-04-16 19:46 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Glibc hackers

Applied.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

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

end of thread, other threads:[~2004-04-16 19:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-15  4:02 [PATCH] Also check si_code == SI_MESGQ in tst-mqueue5 Jakub Jelinek
2004-04-16 19:46 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).