Commit e6a7540
Addresses review feedback from @bennyz and @raballew on #642:
- **dnsmasq.stop() missing state_dir**: Pass
`state_dir=self._state_path` so the pidfile is used as the authoritative
PID source, matching the pattern already used by `reload_config()`
- **NAT probe at import time**: Defer `_can_nat_between_namespaces()`
from module-level execution to a session-scoped `nat_available` pytest
fixture, avoiding namespace/veth/nft side effects during `pytest
--collect-only` or IDE test discovery
- **shell=True in test helpers**: Refactor `_run()` and `_popen()` from
string-based `shell=True` to list-based subprocess via `shlex.split()`,
consistent with production code
- **Broken README diagram**: Replace the misaligned hardware diagram
with architecture diagrams showing internal data flow (interface →
dnsmasq → ip_fwd → nftables → upstream) for both NAT and DHCP-only modes
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent abd5d91 commit e6a7540
3 files changed
Lines changed: 75 additions & 29 deletions
File tree
- python/packages/jumpstarter-driver-dut-network
- jumpstarter_driver_dut_network
Lines changed: 44 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
210 | 233 | | |
211 | 234 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
218 | 250 | | |
219 | 251 | | |
220 | 252 | | |
| |||
250 | 282 | | |
251 | 283 | | |
252 | 284 | | |
253 | | - | |
| 285 | + | |
254 | 286 | | |
255 | 287 | | |
256 | | - | |
| 288 | + | |
257 | 289 | | |
258 | 290 | | |
259 | 291 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
Lines changed: 30 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | | - | |
| 38 | + | |
37 | 39 | | |
38 | | - | |
39 | | - | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| 46 | + | |
44 | 47 | | |
45 | | - | |
| 48 | + | |
46 | 49 | | |
47 | | - | |
48 | | - | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
151 | 165 | | |
152 | 166 | | |
153 | 167 | | |
| |||
310 | 324 | | |
311 | 325 | | |
312 | 326 | | |
313 | | - | |
| 327 | + | |
314 | 328 | | |
315 | 329 | | |
316 | 330 | | |
| |||
653 | 667 | | |
654 | 668 | | |
655 | 669 | | |
656 | | - | |
| 670 | + | |
657 | 671 | | |
658 | 672 | | |
659 | 673 | | |
| |||
725 | 739 | | |
726 | 740 | | |
727 | 741 | | |
728 | | - | |
| 742 | + | |
729 | 743 | | |
730 | 744 | | |
731 | 745 | | |
| |||
772 | 786 | | |
773 | 787 | | |
774 | 788 | | |
775 | | - | |
| 789 | + | |
776 | 790 | | |
777 | 791 | | |
778 | 792 | | |
| |||
0 commit comments