Commit 715c7a3
committed
selftests: tls: make the new data_steal test less flaky
The CI has hit a couple of cases of:
RUN global.data_steal ...
tls.c:2762:data_steal:Expected recv(cfd, buf2, sizeof(buf2), MSG_DONTWAIT) (20000) == -1 (-1)
data_steal: Test terminated by timeout
FAIL global.data_steal
Looks like the 2msec sleep is not long enough. Make the sleep longer,
and then instead of second sleep wait for the thieving process to exit.
That way we can be sure it called recv() before us.
While at it also avoid trying to steal more than a record, this seems
to be causing issues in manual testing as well.
Fixes: d7e8259 ("selftests: tls: test TCP stealing data from under the TLS socket")
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 12da2b9 commit 715c7a3
1 file changed
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2748 | 2748 | | |
2749 | 2749 | | |
2750 | 2750 | | |
2751 | | - | |
2752 | | - | |
| 2751 | + | |
| 2752 | + | |
2753 | 2753 | | |
2754 | 2754 | | |
2755 | 2755 | | |
2756 | | - | |
| 2756 | + | |
2757 | 2757 | | |
2758 | 2758 | | |
2759 | 2759 | | |
2760 | 2760 | | |
2761 | | - | |
| 2761 | + | |
| 2762 | + | |
2762 | 2763 | | |
2763 | 2764 | | |
2764 | 2765 | | |
2765 | 2766 | | |
2766 | 2767 | | |
2767 | 2768 | | |
2768 | 2769 | | |
2769 | | - | |
2770 | | - | |
2771 | | - | |
2772 | 2770 | | |
2773 | 2771 | | |
2774 | 2772 | | |
| |||
0 commit comments