Skip to contentSkip to conversation

tests/sctp: bump connect timeout to 4 seconds

PATCH In review Ondrej Mosnacek 2 participants 3 messages Aug 27, 2020 – Sep 3, 2020 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/sctp: bump connect timeout to 4 seconds

The current value of 2 seconds causes transient failures too often in certain slow/unstable environments (including the nested KVM Travis CI setup). Our experience from downstream testing at Red Hat (across a variety of HW and architectures) has shown that a value of 4 seconds yields only very sporadic failures.

Therefore, change the value to 4 to trade off some testing time for more stability.

---
 tests/sctp/sctp_client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/sctp/sctp_client.c +1 -1
index 595da75..2f527ed 100644
@@ -99,7 +99,7 @@ int main(int argc, char **argv)
 	 *    EAGAIN - Resource temporarily unavailable - SOCK_SEQPACKET
 	 *        Uses SO_RCVTIMEO when NO connects are called.
 	 */
-	tm.tv_sec = 2;
+	tm.tv_sec = 4;
 	tm.tv_usec = 0;
 	result = setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, &tm, sizeof(tm));
 	if (result < 0) {
Signature · 1 line
2.26.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Ondrej Mosnacek

The current value of 2 seconds causes transient failures too often in certain slow/unstable environments (including the nested KVM Travis CI setup). Our experience from downstream testing at Red Hat (across a variety of HW and architectures) has shown that a value of 4 seconds yields only very sporadic failures.

Therefore, change the value to 4 to trade off some testing time for more stability.

As much as I dislike relying on timeouts and making the testsuite even slower, I don't have any better solution.

(feel free to merge it yourself)

#2 lore raw
Quoted 12 lines · Stephen Smalley
Quoted 10 lines · Ondrej Mosnacek

The current value of 2 seconds causes transient failures too often in certain slow/unstable environments (including the nested KVM Travis CI setup). Our experience from downstream testing at Red Hat (across a variety of HW and architectures) has shown that a value of 4 seconds yields only very sporadic failures.

Therefore, change the value to 4 to trade off some testing time for more stability.

Quoted 7 lines
Quoted 1 line

As much as I dislike relying on timeouts and making the testsuite even slower, I don't have any better solution.

(feel free to merge it yourself)

Thanks, merged.

Signature · 3 lines
Ondrej Mosnacek
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.