svn commit: r345809 - projects/fuse2/tests/sys/fs/fusefs

Enji Cooper yaneurabeya at gmail.com
Tue Apr 2 18:51:04 UTC 2019


> On Apr 2, 2019, at 11:49 AM, Alan Somers <asomers at FreeBSD.org> wrote:
> 
> On Tue, Apr 2, 2019 at 12:45 PM Enji Cooper <yaneurabeya at gmail.com> wrote:
>> 
>> 
>>> On Apr 2, 2019, at 11:44 AM, Alan Somers <asomers at FreeBSD.org> wrote:
>>> 
>>> Author: asomers
>>> Date: Tue Apr  2 18:44:01 2019
>>> New Revision: 345809
>>> URL: https://svnweb.freebsd.org/changeset/base/345809
>>> 
>>> Log:
>>> fusefs: check return value of wait(2) in fork tests
>>> 
>>> Reported by: ngie
>>> Sponsored by:        The FreeBSD Foundation
>>> 
>>> Modified:
>>> projects/fuse2/tests/sys/fs/fusefs/utils.cc
>>> 
>>> Modified: projects/fuse2/tests/sys/fs/fusefs/utils.cc
>>> ==============================================================================
>>> --- projects/fuse2/tests/sys/fs/fusefs/utils.cc       Tue Apr  2 18:09:40 2019        (r345808)
>>> +++ projects/fuse2/tests/sys/fs/fusefs/utils.cc       Tue Apr  2 18:44:01 2019        (r345809)
>>> @@ -321,7 +321,7 @@ out:
>>>              /* Signal the child process to go */
>>>              ASSERT_EQ(0, sem_post(sem)) << strerror(errno);
>>> 
>>> -             wait(&child_status);
>>> +             ASSERT_LE(0, wait(&child_status)) << strerror(errno);
>> 
>> Don’t you want ASSERT_GE here, since you’re testing that wait succeeded?
>> -Enji
> 
> Opposite operand order.  I'm asserting that 0 is less than or equal to
> wait's return value.

Ah, yes. Derp. Thank you for correcting me on that :D.
-Enji



More information about the svn-src-projects mailing list