Page MenuHomeFreeBSD

ggate: fix test intermittency
ClosedPublic

Authored by asomers on Tue, Oct 13, 6:12 PM.
Tags
None
Referenced Files
F175998673: D60707.id.diff
Thu, Oct 15, 4:21 AM
F175997012: D60707.diff
Thu, Oct 15, 3:58 AM
Unknown Object (File)
Wed, Oct 14, 10:30 AM
Unknown Object (File)
Wed, Oct 14, 4:56 AM
Unknown Object (File)
Wed, Oct 14, 3:03 AM
Unknown Object (File)
Wed, Oct 14, 1:27 AM
Unknown Object (File)
Tue, Oct 13, 9:59 PM
Unknown Object (File)
Tue, Oct 13, 9:02 PM
Subscribers

Details

Summary
  • ggatel: fix piped output. Flush stdout before daemonizing, so the output can be read when it's in a command pipeline.
  • ggated: bind the port _before_ daemonizing, so an invoking script can be sure that the port is bound as soon as the command returns.
  • tests: allow ggatec or ggatel to automatically allocate a device number instead of choosing one in a racy way.

With all of these changes I can no run the tests 1000 times without
fail. And in parallel, too.

MFC after: 1 week
Sponsored by: ConnectWise
PR: 298942
Reported by: siva

Test Plan

existing test cases exercised

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ngie added a subscriber: ngie.
ngie added inline comments.
sbin/ggate/ggated/ggated.c
1123–1136

It might be a good idea to add a short comment noting the ordering.

tests/sys/geom/class/gate/ggate_test.sh
105–107

-s exit:0 is the default.

This revision is now accepted and ready to land.Wed, Oct 14, 8:54 PM
This revision was automatically updated to reflect the committed changes.