Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Dec 2022 10:47:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        testing@FreeBSD.org
Subject:   [Bug 268390] Kyua KTLS tests (*bad_minor, *bad_major) fail randomly
Message-ID:  <bug-268390-32464@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268390

            Bug ID: 268390
           Summary: Kyua KTLS tests (*bad_minor, *bad_major) fail randomly
           Product: Base System
           Version: CURRENT
          Hardware: i386
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: tests
          Assignee: testing@FreeBSD.org
          Reporter: michalx.gulbicki@intel.com

Following KTLS test can fail randomly - no matter if any HW OCF backend is
registered or not:

ktls_test:ktls_receive_aes128_gcm_1_3_bad_major  ->  failed:
/usr/src/tests/sys/kern/ktls_test.c:258: close(sv[1]) =3D=3D 0 not met  [0.=
022s]
ktls_test:ktls_receive_aes128_gcm_1_3_bad_minor  ->  failed:
/usr/src/tests/sys/kern/ktls_test.c:258: close(sv[1]) =3D=3D 0 not met  [0.=
018s]
ktls_test:ktls_receive_aes128_gcm_1_3_bad_type  ->  failed:
/usr/src/tests/sys/kern/ktls_test.c:258: close(sv[1]) =3D=3D 0 not met  [0.=
020s]
ktls_test:ktls_receive_aes256_cbc_1_2_sha256_bad_minor  ->  failed:
/usr/src/tests/sys/kern/ktls_test.c:258: close(sv[1]) =3D=3D 0 not met  [0.=
017s]
ktls_test:ktls_receive_chacha20_poly1305_1_3_bad_major  ->  failed:
/usr/src/tests/sys/kern/ktls_test.c:258: close(sv[1]) =3D=3D 0 not met  [0.=
017s]

Adding a few ms delay between sending request to ktls socket and calling rc=
vmsg
makes code much more robust (10+ consecutive runs without any radom fail).
usleep has been added here: (ktls_test.c)

diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c
index 09fb96ed11e..8a7652a6645 100644
--- a/tests/sys/kern/ktls_test.c
+++ b/tests/sys/kern/ktls_test.c
@@ -1506,6 +1506,7 @@ ktls_receive_tls_error(int fd, int expected_error)
        msg.msg_iov =3D &iov;
        msg.msg_iovlen =3D 1;

+       usleep(5 * 1000); // 5ms
        ATF_REQUIRE(recvmsg(fd, &msg, 0) =3D=3D -1);
        if (expected_error !=3D 0)
                ATF_REQUIRE(errno =3D=3D expected_error);

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268390-32464>