From acdde6112ce706c1ba6775eaa07cdf6efdbb596b Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Thu, 11 Mar 2010 10:04:55 -0800 Subject: [PATCH] Make the logfile output of TestPoisonArea less frightening ("signal 11 as expected" instead of "Segmentation fault" for should-crash cases). test-only, no bug --- layout/base/tests/TestPoisonArea.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/layout/base/tests/TestPoisonArea.cpp b/layout/base/tests/TestPoisonArea.cpp index 0c1b2014fd0..03220aab522 100644 --- a/layout/base/tests/TestPoisonArea.cpp +++ b/layout/base/tests/TestPoisonArea.cpp @@ -486,7 +486,8 @@ TestPage(const char *pagelabel, uintptr_t pageaddr, int should_succeed) if (should_succeed) { printf("TEST-PASS | %s %s\n", oplabel, pagelabel); } else { - printf("TEST-UNEXPECTED-FAIL | %s %s\n", oplabel, pagelabel); + printf("TEST-UNEXPECTED-FAIL | %s %s | unexpected successful exit\n", + oplabel, pagelabel); failed = true; } } else if (WIFEXITED(status)) { @@ -495,12 +496,12 @@ TestPage(const char *pagelabel, uintptr_t pageaddr, int should_succeed) exit(2); } else if (WIFSIGNALED(status)) { if (should_succeed) { - printf("TEST-UNEXPECTED-FAIL | %s %s | %s\n", - oplabel, pagelabel, strsignal(WTERMSIG(status))); + printf("TEST-UNEXPECTED-FAIL | %s %s | unexpected signal %d\n", + oplabel, pagelabel, WTERMSIG(status)); failed = true; } else { - printf("TEST-PASS | %s %s | %s\n", - oplabel, pagelabel, strsignal(WTERMSIG(status))); + printf("TEST-PASS | %s %s | signal %d (as expected)\n", + oplabel, pagelabel, WTERMSIG(status)); } } else { printf("ERROR | %s %s | unexpected exit status %d\n",