K 10 svn:author V 7 git2svn K 8 svn:date V 27 2022-11-09T12:10:25.615967Z K 7 svn:log V 699 tests: make sniffer more robust The Sniffer class is often used by test tools such as pft_ping to verify that packets actually get sent where they're expected. It starts a background thread to capture packets, but this thread needs some time to start, leading to intermittent test failures when the capture doesn't start before the relevant packet is sent. Add a semaphore to ensure the Sniffer constructor doesn't return until the capture is actually running. PR: 260461 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 67557372dfef87eb94681a97a4157198efe21992) Git Hash: 97967fc8e63fb9ce65efe62cb87f89e45711dd3c Git Author: kp@FreeBSD.org END