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

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