bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: perror.m4 test


From: Bruno Haible
Subject: Re: perror.m4 test
Date: Sat, 15 Oct 2011 11:49:58 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

Hi Eric,

Daniel Richard G. wrote:
> > > * "checking whether perror matches strerror": strerror(-1) returns
> > >   an invalid pointer, and attempting to puts() this yields SIGBUS.
> > >   (Wouldn't it be safer to pass EPERM or something similarly
> > >   universal?)
> >
> > This is the purpose of the test: testing whether you can safely pass
> > invalid error number, such as -1, to strerror.
> 
> I thought it was to test that perror() and strerror() gave the
> same output.
> 
> Note that currently, the test passes despite the SIGBUS. It should
> probably check that $? = 0 before comparing stdout vs. stderr.

I'm not sure. This test is about perror(). Should it fail just because
strerror returns an invalid pointer? Eric, what do you think?

Bruno
-- 
In memoriam Thomas Sankara <http://en.wikipedia.org/wiki/Thomas_Sankara>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]