This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Write errors to stdout and not stderr in wcsmbs/tst-mbrtowc.c


> The dup2 hack is either cute or horrible (likely both).  I don't think we
> should do anything like that in one random test.

Okay.

>  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 thing we cannot do is use `dup2' in the skeleton. It might confuse tests
that specifically test for output written to stdout/stderr. One such example
is 'posix/tst-getopt_long1.c'.

> If you'd like to convert these tests to use test-skeleton.c first as a
> separate change before we figure out how to address the assert issue,
> that could go in right away.

Okay. And I see that this itself is a task in the master TODO [1]. I will
get on it more thoroughly than just these two tests. In the meanwhile,
there are also a lot of tests writing to stderr [2]. If we have the policy
on that wrapped up, I will work on it next.

I am sort of new here, by the way. Hello, glibc hackers!

Cheers,
Arjun

[1] https://sourceware.org/glibc/wiki/Development_Todo/Master#Use_test-skeleton.c
[2] http://fpaste.org/139008/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]