Commit eef08fe
driver/rawnetworkinterfacedriver: make start_record() block until capture started
The expectation of RawNetworkInterfaceDriver.start_record() is that it
returns once the packet capturing is running, so later code can start
right away generating packets that are received on the interface.
This does not work reliably currently because the labgrid-raw-interface
helper (wrapping tcpdump) is started via subprocess.Popen(), but that
does not mean the capture is actually running just yet.
To fix this, wait until the subprocess emits "tcpdump: listening on",
which is tcpdump's way of telling that it's now actually capturing.
Signed-off-by: Bastian Krause <[email protected]>1 parent 1e207b2 commit eef08fe
1 file changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
223 | 243 | | |
224 | 244 | | |
225 | 245 | | |
| |||
0 commit comments