[PATCH][BZ #12685] Allow arbitrary number of modes in fopen.

Joseph S. Myers joseph@codesourcery.com
Fri May 10 11:45:00 GMT 2013


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



More information about the Libc-alpha mailing list