[Top][All Lists]
[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>
- Re: gl_ABSOLUTE_HEADER_ONE and older seds, Bruno Haible, 2011/10/13
- Re: gl_ABSOLUTE_HEADER_ONE and older seds, Daniel Richard G., 2011/10/13
- Re: gl_ABSOLUTE_HEADER_ONE and older seds, Bruno Haible, 2011/10/13
- Re: gl_ABSOLUTE_HEADER_ONE and older seds, Daniel Richard G., 2011/10/14
- Re: porting to NeXTstep, Bruno Haible, 2011/10/14
- Re: porting to NeXTstep, Daniel Richard G., 2011/10/15
- Re: perror.m4 test,
Bruno Haible <=
- Re: perror.m4 test, Eric Blake, 2011/10/15
- Re: perror.m4 test, Bruno Haible, 2011/10/22
- Preserving non-alphanumeric characters in git commits [was Re: porting to NeXTstep], Gary V. Vaughan, 2011/10/15
- Re: porting to NeXTstep, Daniel Richard G., 2011/10/17
- Re: porting to NeXTstep, Bruno Haible, 2011/10/19
- Re: porting to NeXTstep, Bruno Haible, 2011/10/22
- Re: porting to NeXTstep, Daniel Richard G., 2011/10/23
- Re: porting to NeXTstep, Daniel Richard G., 2011/10/23