From 2d58d8154ade6dd9b1cd8d01450ac0b7b53ab62a Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 26 May 2019 16:28:21 +0100 Subject: [PATCH] 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 953098f31..1fc4682aa 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 44d177ac5..74045356f 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 f31ef8d1c..5f0257810 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 -- 2.25.1