]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/tls: add test for sleeping even though there is data
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 24 May 2019 17:34:33 +0000 (10:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2019 05:59:44 +0000 (07:59 +0200)
commit9904c83d0c50ca46a61a45f52fcddca6c5ea9d95
treeb7a281758de2d4d9170dbed4548d953a9ca93b31
parent4e0cec52467d7148b9bfa14cc77afd322861ab06
selftests/tls: add test for sleeping even though there is data

[ Upstream commit 043556d0917a1a5ea58795fe1656a2bce06d2649 ]

Add a test which sends 15 bytes of data, and then tries
to read 10 byes twice.  Previously the second read would
sleep indifinitely, since the record was already decrypted
and there is only 5 bytes left, not full 10.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/net/tls.c