Commit 3a19c4a
authored
Fix vsock test flake
This fixes #1197.
The test is a simple off by one error which leads to a race condition. We end up waiting for
`harness.tx_used_idx()` to reach one less descriptor than we should be, which means calling
`reset_tx_cursors` at the top of the loop resets the `QueueWriter` too soon. This opens a window for
the poller to not read all the RW packets that we are sending. The log in the test confirms this,
and explains why our `read_exact()` fails.
```
Aug 14 02:51:12.719 WARN dropping invalid vsock packet: vsock packet header reported 8192 bytes but the descriptor chain contains 0, component: vsock-test
```
Reviewers: iximeow
Reviewed By: iximeow
Pull Request: #11981 parent c9bae7e commit 3a19c4a
1 file changed
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1465 | 1465 | | |
1466 | 1466 | | |
1467 | 1467 | | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
1468 | 1472 | | |
1469 | 1473 | | |
1470 | 1474 | | |
| |||
1473 | 1477 | | |
1474 | 1478 | | |
1475 | 1479 | | |
1476 | | - | |
1477 | | - | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
1478 | 1484 | | |
1479 | 1485 | | |
1480 | 1486 | | |
| |||
1491 | 1497 | | |
1492 | 1498 | | |
1493 | 1499 | | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
1494 | 1504 | | |
1495 | 1505 | | |
1496 | | - | |
1497 | 1506 | | |
1498 | | - | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
1499 | 1512 | | |
1500 | 1513 | | |
1501 | 1514 | | |
| |||
0 commit comments