This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #12685] Allow arbitrary number of modes in fopen.
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: Carlos O'Donell <carlos at redhat dot com>, <libc-alpha at sourceware dot org>
- Date: Fri, 10 May 2013 11:45:15 +0000
- Subject: Re: [PATCH][BZ #12685] Allow arbitrary number of modes in fopen.
- References: <20130509152046 dot GA4242 at domone dot kolej dot mff dot cuni dot cz> <Pine dot LNX dot 4 dot 64 dot 1305091533180 dot 25142 at digraph dot polyomino dot org dot uk> <518BEFB2 dot 80304 at redhat dot com> <20130510103330 dot GA12338 at domone dot kolej dot mff dot cuni dot cz>
On Fri, 10 May 2013, Ondrej Bilka wrote:
> > > I think this should add testcases (for both functions) that a mode late in
> > > a long string is properly handled.
> > >
> >
> > I agree we need test cases for this to prevent regression.
> >
> How should I test it? It looks that only x has directly testable
> behaviour.
E.g. open with mode "rccccccccccccccccccccce" and use fcntl to verify that
FD_CLOEXEC is set on the file descriptor.
Looking at the descriptions you quote, maybe testing for fdopen is hard
because various flags are ignored anyway for fdopen, but it should at
least be possible to test for fopen.
--
Joseph S. Myers
joseph@codesourcery.com