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][BZ #12685] Allow arbitrary number of modes in fopen.


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


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