From aec1a09487e955b151c5bb891ee4569d2cbfaf9c Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Tue, 4 Nov 2014 16:02:46 +0000 Subject: [PATCH] Fix the Jenkins test run by skipping the negative testcases earlier The problem is that lib.libc.locale.t_io:bad_big5_wprintf was printing out illegal Unicode characters, which causes XML parsers to bail immediately, e.g. % kyua report-junit > ~/report.junit % python2 -c 'import xml.dom.minidom as md; md.parse("/home/ngie/report.junit")' Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/xml/dom/minidom.py", line 1918, in parse return expatbuilder.parse(file) File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse result = builder.parseFile(fp) File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile parser.Parse(buffer, 0) xml.parsers.expat.ExpatError: not well-formed (invalid token): line 27137, column 13 --- contrib/netbsd-tests/lib/libc/locale/t_io.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/locale/t_io.c b/contrib/netbsd-tests/lib/libc/locale/t_io.c index 7f7293a02e19..86029e934d58 100644 --- a/contrib/netbsd-tests/lib/libc/locale/t_io.c +++ b/contrib/netbsd-tests/lib/libc/locale/t_io.c @@ -53,14 +53,15 @@ ATF_TC_HEAD(bad_big5_wprintf, tc) ATF_TC_BODY(bad_big5_wprintf, tc) { +#ifdef __FreeBSD__ + atf_tc_skip("does not fail as expected (may be implementation " + "specific issue with the test)"); +#endif + /* XXX implementation detail knowledge (wchar_t encoding) */ wchar_t ibuf[] = { 0xcf10, 0 }; setlocale(LC_CTYPE, "zh_TW.Big5"); -#if defined(__FreeBSD__) - atf_tc_expect_fail("does not fail as expected (may be implementation " - "specific issue with the test)"); -#endif ATF_REQUIRE_ERRNO(EILSEQ, wprintf(L"%ls\n", ibuf) < 0); ATF_REQUIRE(ferror(stdout)); } @@ -73,15 +74,16 @@ ATF_TC_HEAD(bad_big5_swprintf, tc) ATF_TC_BODY(bad_big5_swprintf, tc) { +#ifdef __FreeBSD__ + atf_tc_skip("does not fail as expected (may be implementation " + "specific issue with the test)"); +#endif + /* XXX implementation detail knowledge (wchar_t encoding) */ wchar_t ibuf[] = { 0xcf10, 0 }; wchar_t obuf[20]; setlocale(LC_CTYPE, "zh_TW.Big5"); -#if defined(__FreeBSD__) - atf_tc_expect_fail("does not fail as expected (may be implementation " - "specific issue with the test)"); -#endif ATF_REQUIRE_ERRNO(EILSEQ, swprintf(obuf, sizeof(obuf), L"%ls\n", ibuf) < 0); } @@ -171,7 +173,7 @@ ATF_TC_BODY(bad_big5_getwc, tc) ATF_REQUIRE(fp != NULL); setlocale(LC_CTYPE, "zh_TW.Big5"); -#if defined(__FreeBSD__) +#ifdef __FreeBSD__ atf_tc_expect_fail("does not return WEOF as expected"); #endif ATF_REQUIRE_EQ(getwc(fp), WEOF);