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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  5 Feb 2021 18:09:50 +0100
From:   Björn Töpel <bjorn.topel@...il.com>
To:     ast@...nel.org, daniel@...earbox.net, netdev@...r.kernel.org,
        bpf@...r.kernel.org
Cc:     Björn Töpel <bjorn.topel@...el.com>,
        u9012063@...il.com
Subject: [PATCH bpf] selftests/bpf: use bash instead of sh in test_xdp_redirect.sh

From: Björn Töpel <bjorn.topel@...el.com>

The test_xdp_redirect.sh script uses some bash-features, such as
'&>'. On systems that use dash as the sh implementation this will not
work as intended. Change the shebang to use bash instead.

Also remove the 'set -e' since the script actually relies on that the
return value can be used to determine pass/fail of the test.

Fixes: 996139e801fd ("selftests: bpf: add a test for XDP redirect")
Signed-off-by: Björn Töpel <bjorn.topel@...el.com>
---
 tools/testing/selftests/bpf/test_xdp_redirect.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/testing/selftests/bpf/test_xdp_redirect.sh b/tools/testing/selftests/bpf/test_xdp_redirect.sh
index dd80f0c84afb..db35e40947ff 100755
--- a/tools/testing/selftests/bpf/test_xdp_redirect.sh
+++ b/tools/testing/selftests/bpf/test_xdp_redirect.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Create 2 namespaces with two veth peers, and
 # forward packets in-between using generic XDP
 #
@@ -72,7 +72,6 @@ test_xdp_redirect()
 	cleanup
 }
 
-set -e
 trap cleanup 2 3 6 9
 
 test_xdp_redirect xdpgeneric

base-commit: 6183f4d3a0a2ad230511987c6c362ca43ec0055f
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ