diff options
| author | Geliang Tang <tanggeliang@kylinos.cn> | 2026-05-21 17:11:53 +0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-05-22 15:36:51 -0700 |
| commit | 6ec863c1848167fdd7124717a24f0a2b99e160ba (patch) | |
| tree | 93a499c37774083661ea8caa674483baeeaec5aa /scripts/decode_stacktrace.sh | |
| parent | 95fab46aea57d6d7b76b319341acbefe8a9293c8 (diff) | |
selftests: tls: use ASSERT_GE in test_mutliproc
In test_mutliproc(), when send() or recv() returns an error (e.g.,
-1), the test continues to execute the remaining code and fails
repeatedly due to using EXPECT_GE.
For example, if a TLS connection is broken and recv() returns -1,
EXPECT_GE(res, 0) records a failure but does not stop the test.
The test then proceeds with left -= res (where res = -1), causing
left to increase unexpectedly, and the loop continues indefinitely.
This results in a massive number of identical failure messages:
# tls.c:1686:mutliproc_sendpage_writers:Expected res (-1) >= 0 (0)
# tls.c:1686:mutliproc_sendpage_writers:Expected res (-1) >= 0 (0)
... (hundreds of identical failures)
Fix this by replacing EXPECT_GE with ASSERT_GE. When send() or recv()
fails, ASSERT_GE immediately aborts the current test, preventing
the subsequent undefined behavior and endless failure messages.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Link: https://patch.msgid.link/0ee9f412b6bd1a260a547d19f979f73b396746ac.1779354585.git.tanggeliang@kylinos.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/decode_stacktrace.sh')
0 files changed, 0 insertions, 0 deletions
