This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Write errors to stdout and not stderr in wcsmbs/tst-mbrtowc.c
- From: Will Newton <will dot newton at linaro dot org>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: Arjun Shankar <arjun dot is at lostca dot se>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Mon, 6 Oct 2014 09:33:33 +0100
- Subject: Re: [PATCH] Write errors to stdout and not stderr in wcsmbs/tst-mbrtowc.c
- Authentication-results: sourceware.org; auth=none
- References: <20141003205833 dot 6deb3569 at zion> <20141003193628 dot 9B2BD2C3AB2 at topped-with-meat dot com>
On 3 October 2014 20:36, Roland McGrath <roland@hack.frob.com> wrote:
> The dup2 hack is either cute or horrible (likely both). I don't think we
> should do anything like that in one random test. Rather, we should settle
> on a uniform policy for tests and using assert. It could be that we never
> use assert. Or it could be that we use assert freely and just make
> test-skeleton.c always do the dup2 hack itself. Or it could be something
> else I haven't thought of off hand. But let's get a plan.
One option could be to use a hand-rolled assert function which is what
most unit testing libraries do. This would also give scope for adding
more esoteric asserts that can output more detail about the failure.
--
Will Newton
Toolchain Working Group, Linaro