Blame SOURCES/0014-iptables-test.py-Fix-host-mode.patch

576484
From 40e7bc3055f9bc34ccb6327f1f32c2fc524fb693 Mon Sep 17 00:00:00 2001
576484
From: Phil Sutter <phil@nwl.cc>
576484
Date: Tue, 18 Feb 2020 16:43:16 +0100
576484
Subject: [PATCH] iptables-test.py: Fix --host mode
576484
576484
In some cases, the script still called repo binaries. Avoid this when in
576484
--host mode to allow testing without the need to compile sources in
576484
beforehand.
576484
576484
Fixes: 1b5d762c1865e ("iptables-test: Support testing host binaries")
576484
Signed-off-by: Phil Sutter <phil@nwl.cc>
576484
(cherry picked from commit ba2af278e8836977a8cfb35c54dac60ca9b40000)
576484
Signed-off-by: Phil Sutter <psutter@redhat.com>
576484
---
576484
 iptables-test.py | 5 ++---
576484
 1 file changed, 2 insertions(+), 3 deletions(-)
576484
576484
diff --git a/iptables-test.py b/iptables-test.py
576484
index fdb4e6a3644e4..e986d7a318218 100755
576484
--- a/iptables-test.py
576484
+++ b/iptables-test.py
576484
@@ -119,8 +119,7 @@ def run_test(iptables, rule, rule_save, res, filename, lineno, netns):
576484
         elif splitted[0] == EBTABLES:
576484
             command = EBTABLES_SAVE
576484
 
576484
-    path = os.path.abspath(os.path.curdir) + "/iptables/" + EXECUTEABLE
576484
-    command = path + " " + command
576484
+    command = EXECUTEABLE + " " + command
576484
 
576484
     if netns:
576484
             command = "ip netns exec ____iptables-container-test " + command
576484
@@ -165,7 +164,7 @@ def execute_cmd(cmd, filename, lineno):
576484
     '''
576484
     global log_file
576484
     if cmd.startswith('iptables ') or cmd.startswith('ip6tables ') or cmd.startswith('ebtables ') or cmd.startswith('arptables '):
576484
-        cmd = os.path.abspath(os.path.curdir) + "/iptables/" + EXECUTEABLE + " " + cmd
576484
+        cmd = EXECUTEABLE + " " + cmd
576484
 
576484
     print("command: {}".format(cmd), file=log_file)
576484
     ret = subprocess.call(cmd, shell=True, universal_newlines=True,
576484
-- 
576484
2.25.1
576484