lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200129221821.GA47050@peto-laptopnovy>
Date:   Wed, 29 Jan 2020 23:18:21 +0100
From:   Peter Júnoš <petoju@...il.com>
To:     netdev@...r.kernel.org, stephen@...workplumber.org
Cc:     dsahern@...il.com, petoju@...il.com
Subject: [PATCH net-next] ss: fix tests to reflect compact output

This fixes broken tests in c4f58629945898722ad9078e0f407c96f1ec7d2b

It also escapes stars as grep is used and more bugs could sneak under
the radar with the previous solution.
---
 testsuite/tests/ss/ssfilter.t | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/testsuite/tests/ss/ssfilter.t b/testsuite/tests/ss/ssfilter.t
index 3091054f..4c2315ca 100755
--- a/testsuite/tests/ss/ssfilter.t
+++ b/testsuite/tests/ss/ssfilter.t
@@ -12,37 +12,37 @@ export TCPDIAG_FILE="$(dirname $0)/ss1.dump"
 ts_log "[Testing ssfilter]"
 
 ts_ss "$0" "Match dport = 22" -Htna dport = 22
-test_on "ESTAB     0           0                10.0.0.1:36266           10.0.0.1:22"
+test_on "ESTAB 0      0      10.0.0.1:36266 10.0.0.1:22"
 
 ts_ss "$0" "Match dport 22" -Htna dport 22
-test_on "ESTAB     0           0                10.0.0.1:36266           10.0.0.1:22"
+test_on "ESTAB 0      0      10.0.0.1:36266 10.0.0.1:22"
 
 ts_ss "$0" "Match (dport)" -Htna '( dport = 22 )'
-test_on "ESTAB     0           0                10.0.0.1:36266           10.0.0.1:22"
+test_on "ESTAB 0      0      10.0.0.1:36266 10.0.0.1:22"
 
 ts_ss "$0" "Match src = 0.0.0.0" -Htna src = 0.0.0.0
-test_on "LISTEN      0           128               0.0.0.0:22             0.0.0.0:*"
+test_on "LISTEN 0      128    0.0.0.0:22 0.0.0.0:\*"
 
 ts_ss "$0" "Match src 0.0.0.0" -Htna src 0.0.0.0
-test_on "LISTEN      0           128               0.0.0.0:22             0.0.0.0:*"
+test_on "LISTEN 0      128    0.0.0.0:22 0.0.0.0:\*"
 
 ts_ss "$0" "Match src sport" -Htna src 0.0.0.0 sport = 22
-test_on "LISTEN      0           128               0.0.0.0:22             0.0.0.0:*"
+test_on "LISTEN 0      128    0.0.0.0:22 0.0.0.0:\*"
 
 ts_ss "$0" "Match src and sport" -Htna src 0.0.0.0 and sport = 22
-test_on "LISTEN      0           128               0.0.0.0:22             0.0.0.0:*"
+test_on "LISTEN 0      128    0.0.0.0:22 0.0.0.0:\*"
 
 ts_ss "$0" "Match src and sport and dport" -Htna src 10.0.0.1 and sport = 22 and dport = 50312
-test_on "ESTAB     0           0                10.0.0.1:22           10.0.0.2:50312"
+test_on "ESTAB 0      0      10.0.0.1:22 10.0.0.2:50312"
 
 ts_ss "$0" "Match src and sport and (dport)" -Htna 'src 10.0.0.1 and sport = 22 and ( dport = 50312 )'
-test_on "ESTAB     0           0                10.0.0.1:22           10.0.0.2:50312"
+test_on "ESTAB 0      0      10.0.0.1:22 10.0.0.2:50312"
 
 ts_ss "$0" "Match src and (sport and dport)" -Htna 'src 10.0.0.1 and ( sport = 22 and dport = 50312 )'
-test_on "ESTAB     0           0                10.0.0.1:22           10.0.0.2:50312"
+test_on "ESTAB 0      0      10.0.0.1:22 10.0.0.2:50312"
 
 ts_ss "$0" "Match (src and sport) and dport" -Htna '( src 10.0.0.1 and sport = 22 ) and dport = 50312'
-test_on "ESTAB     0           0                10.0.0.1:22           10.0.0.2:50312"
+test_on "ESTAB 0      0      10.0.0.1:22 10.0.0.2:50312"
 
 ts_ss "$0" "Match (src or src) and dst" -Htna '( src 0.0.0.0 or src 10.0.0.1 ) and dst 10.0.0.2'
-test_on "ESTAB     0           0                10.0.0.1:22           10.0.0.2:50312"
+test_on "ESTAB 0      0      10.0.0.1:22 10.0.0.2:50312"
-- 
2.24.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ