NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/53931 (posix_fadvise_reg test case fails randomly on real hardware)
The following reply was made to PR kern/53931; it has been noted by GNATS.
From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/53931 (posix_fadvise_reg test case fails randomly on real hardware)
Date: Sun, 13 Apr 2025 08:57:41 +0700
Date: Sun, 13 Apr 2025 00:31:02 +0000 (UTC)
From: riastradh%NetBSD.org@localhost
Message-ID: <20250413003103.307A81A923F%mollari.NetBSD.org@localhost>
| Need a ruling from an Austin Group whisperer:
Not so much me any more (for now anyway) - I tested running (munnari.oz.au)
without IPv4 connectivity for a while last year .. just IPv6. Most things
I care about didn't mind at all (incl NetBSD lists, etc, and IETF stuff).
Some gnu lists more or less bounced me, but kept sending mail up until
after my little experiment was over indicating why, and how to get reinstated
(well one, that's all I'm on...)
But the Austin group simply removed me from the mailing list, and
so far I haven't found the magic formula to get reinstated. So, I
can't ask.
But:
| is posix_fadvise (and
| any other POSIX function that returns an error code instead of setting
| errno and returning -1, like pthread_*) _allowed_ to set errno, or
| _required_ to leave errno as it was on entry when it returns?
I believe the answer to that can be inferred from XSH 2.3 Error Numbers
Some functions provide the error number in a variable accessed
through the symbol errno, defined by including the <errno.h> header.
The value of errno should only be examined when it is indicated to
be valid by a function's return value.
That is, effectively, unless a function is defined to return a value
in errno, and the function returns a value which indicates that has happened
(typically -1, or NULL) then the state of errno is undefined after any of
the defined functions are called.
There are some functions which expressly indicate that errno must not
be altered by the function, but not a lot.
posix_fadvise() as best I can tell isn't such a function. I haven't
checked all the pthread_*() functions though - there are many!
So:
| If it's allowed to set errno, we can close this -- test has been fixed.
I am fairly sure that's the case, almost anything is allowed to alter
errno - usually by calling some other function which returns an error,
but where that error is not fatal to the call in question.
kre
Home |
Main Index |
Thread Index |
Old Index