HomeFreeBSD

Correct possible misleading error message in kqtest.

Description

Correct possible misleading error message in kqtest.

ian@ pointed out that in the test_abstime() function time(NULL) is
used twice; once in an "if" test and again in the enclosed error
message. If the true branch was taken and the process got preempted
before the second time(NULL) call, by the time the error message was
generated enough time could have elapsed that the message could claim
that the event came "too early" but print an event time that was after
the expected timeout. Correct by making the time(NULL) call only once
and using that returned time in both the "if" test and the error
message.

Reported by: ian@
MFC after: 4 days
X-MFC-with: r336761, r336781, r336802
Sponsored by: Dell EMC

Details

Provenance
dabAuthored on Jul 30 2018, 2:21 PM
Parents
rG0f17b0b587bc: Regen src.conf.5 after r336901, WITH_LLD_BOOTSTRAP on i386
Branches
Unknown
Tags
Unknown

Event Timeline