[CRIU] [PATCH 09/10] test: static/socket-tcp -- Check for iptables success

Cyrill Gorcunov gorcunov at gmail.com
Wed Sep 19 14:50:35 MSK 2018


Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 test/zdtm/static/socket-tcp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/zdtm/static/socket-tcp.c b/test/zdtm/static/socket-tcp.c
index 1db5a4dd6b72..18eb3792cfe5 100644
--- a/test/zdtm/static/socket-tcp.c
+++ b/test/zdtm/static/socket-tcp.c
@@ -76,7 +76,8 @@ int main(int argc, char **argv)
 		return 1;
 	if (system("iptables -w -A INPUT -i lo -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT"))
 		return 1;
-	system("iptables -A INPUT -j DROP");
+	if (system("iptables -A INPUT -j DROP"))
+		return 1;
 #endif
 
 #ifdef ZDTM_TCP_LOCAL
-- 
2.17.1



More information about the CRIU mailing list