Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libc/gen For now, don't try to print out machine-d...



details:   https://anonhg.NetBSD.org/src/rev/f4e8e0bb144a
branches:  trunk
changeset: 760084:f4e8e0bb144a
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sun Dec 26 03:25:07 2010 +0000

description:
For now, don't try to print out machine-dependant stuff.  When I figure
out what the right format strings are, I'll re-enable it.

diffstat:

 tests/lib/libc/gen/t_siginfo.c |  20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diffs (52 lines):

diff -r c6ea02f06eab -r f4e8e0bb144a tests/lib/libc/gen/t_siginfo.c
--- a/tests/lib/libc/gen/t_siginfo.c    Sat Dec 25 23:43:30 2010 +0000
+++ b/tests/lib/libc/gen/t_siginfo.c    Sun Dec 26 03:25:07 2010 +0000
@@ -28,6 +28,7 @@
 
 #include <atf-c.h>
 
+#include <sys/inttypes.h>
 #include <sys/resource.h>
 #include <sys/time.h>
 #include <sys/ucontext.h>
@@ -56,7 +57,6 @@
 sig_debug(int signo, siginfo_t *info, ucontext_t *ctx)
 {
        unsigned int i;
-       mcontext_t *mc = &ctx->uc_mcontext;
 
        printf("%d %p %p\n", signo, info, ctx);
        if (info != NULL) {
@@ -74,9 +74,14 @@
                printf("uc_stack %p %lu 0x%x\n", ctx->uc_stack.ss_sp, 
                    (unsigned long)ctx->uc_stack.ss_size,
                    ctx->uc_stack.ss_flags);
+               /*
+                * XXX Don't try to print MD __gregs since we don't
+                * XXX know what format to use
+                *
                for (i = 0; i < __arraycount(mc->__gregs); i++)
-                       printf("uc_mcontext.greg[%d] 0x%lx\n", i,
-                           mc->__gregs[i]);
+                       printf("uc_mcontext.greg[%d] 0x%x\n", i,
+                           uc->uc_mcontext.__gregs[i]);
+                */
        }
 }
 
@@ -129,8 +134,13 @@
                printf("si_uid=%d\n", info->si_uid);
                printf("si_pid=%d\n", info->si_pid);
                printf("si_status=%d\n", info->si_status);
-               printf("si_utime=%d\n", info->si_utime);
-               printf("si_stime=%d\n", info->si_stime);
+               /*
+                * XXX don't print these until we figure out the
+                * XXX correct machine-independant format specifier
+                *
+               printf("si_utime=%u\n", info->si_utime);
+               printf("si_stime=%u\n", info->si_stime);
+                */
        }
        ATF_REQUIRE_EQ(info->si_code, code);
        ATF_REQUIRE_EQ(info->si_signo, SIGCHLD);



Home | Main Index | Thread Index | Old Index