Author: ngie Date: Tue Feb 7 05:39:00 2017 New Revision: 313379 URL: https://svnweb.freebsd.org/changeset/base/313379
Log: Expect :int_within_limits to fail when ptrdiff_t/*intmax_t differ in base type The %t{d,u} (ptrdiff_t) tests fail for the following reasons: - ptrdiff_t is by definition int32_t on !LP64 architectures and int64_t on LP64 architectures. - intmax_t is by definition fixed to int64_t on all architectures. - Some of the code in lib/libc/stdio/... is promoting ptrdiff_t to *intmax_t when parsing/representing the value. PR: 191674 MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/lib/libc/tests/stdio/printbasic_test.c Modified: head/lib/libc/tests/stdio/printbasic_test.c ============================================================================== --- head/lib/libc/tests/stdio/printbasic_test.c Tue Feb 7 04:25:21 2017 (r313378) +++ head/lib/libc/tests/stdio/printbasic_test.c Tue Feb 7 05:39:00 2017 (r313379) @@ -111,6 +111,11 @@ ATF_TC_BODY(int_within_limits, tc) testfmt("-1", "%jd", (intmax_t)-1); testfmt(S_UINT64MAX, "%ju", UINT64_MAX); + if (sizeof(ptrdiff_t) != sizeof(uintmax_t)) + atf_tc_expect_fail("the %%t qualifier is broken on 32-bit " + "platforms where there's a mismatch between ptrdiff_t and " + "uintmax_t's type width; bug # 191674"); + testfmt("-1", "%td", (ptrdiff_t)-1); testfmt(S_SIZEMAX, "%tu", (size_t)-1); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"