[exim-cvs] Testsuite: workaround older kernels

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Testsuite: workaround older kernels
Gitweb: https://git.exim.org/exim.git/commitdiff/2d58d8154ade6dd9b1cd8d01450ac0b7b53ab62a
Commit:     2d58d8154ade6dd9b1cd8d01450ac0b7b53ab62a
Parent:     38da9088282b3a74ddcbfe8d60382b55a7e9f426
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun May 26 16:28:21 2019 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun May 26 16:28:21 2019 +0100


    Testsuite: workaround older kernels


    Broken-by: 38da908828
---
 test/scripts/1990-TCP-Fast-Open/1990 | 4 ++--
 test/scripts/4027-TFO-socks/4027     | 4 ++--
 test/scripts/4058-pipe-conn-tfo/4058 | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)


diff --git a/test/scripts/1990-TCP-Fast-Open/1990 b/test/scripts/1990-TCP-Fast-Open/1990
index 953098f..1fc4682 100644
--- a/test/scripts/1990-TCP-Fast-Open/1990
+++ b/test/scripts/1990-TCP-Fast-Open/1990
@@ -32,7 +32,7 @@ system ("tc qdisc add dev lo root netem delay 50ms");
# option on the SYN.
#
sudo perl
-system ("echo 0 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
+system ("[ -e /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec ] && echo 0 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
****
#
# First time runs will see a TFO request option only; subsequent
@@ -75,7 +75,7 @@ sleep 3
#
sudo perl
system ("tc qdisc delete dev lo root");
-system ("echo 3600 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
+system ("[ -e /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec ] && echo 3600 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
****
#
killdaemon
diff --git a/test/scripts/4027-TFO-socks/4027 b/test/scripts/4027-TFO-socks/4027
index 44d177a..7404535 100644
--- a/test/scripts/4027-TFO-socks/4027
+++ b/test/scripts/4027-TFO-socks/4027
@@ -7,7 +7,7 @@ munge loopback
# Disable TFO blackhole-detection as we seem to be running afoul of that
sudo perl
system ("ip tcp_metrics delete 127.0.0.1");
-system ("echo 0 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
+system ("[ -e /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec ] && echo 0 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
****
#
# TFO both clients and server, no cookie yet
@@ -127,7 +127,7 @@ quit
millisleep 500
#
sudo perl
-system ("echo 3600 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
+system ("[ -e /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec ] && echo 3600 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
****
#
# Ends
diff --git a/test/scripts/4058-pipe-conn-tfo/4058 b/test/scripts/4058-pipe-conn-tfo/4058
index f31ef8d..5f02578 100644
--- a/test/scripts/4058-pipe-conn-tfo/4058
+++ b/test/scripts/4058-pipe-conn-tfo/4058
@@ -7,7 +7,7 @@
sudo perl
system ("tc qdisc add dev lo root netem delay 50ms");
system ("ip tcp_metrics delete 127.0.0.1");
-system ("echo 0 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
+system ("[ -e /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec ] && echo 0 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
****
#
#
@@ -72,7 +72,7 @@ killdaemon
#
sudo perl
system ("tc qdisc delete dev lo root");
-system ("echo 3600 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
+system ("[ -e /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec ] && echo 3600 > /proc/sys/net/ipv4/tcp_fastopen_blackhole_timeout_sec");
****
#
no_msglog_check