]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-loopback: suppress warning about ignored unused result
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 3 Oct 2023 12:06:58 +0000 (14:06 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 3 Oct 2023 16:19:07 +0000 (17:19 +0100)
src/test/test-loopback.c

index c18f07cfed57b0fa924f6de06e7a48eb9ffb7665..1a423e556e873e302f29499a60f3f4a85063f28e 100644 (file)
@@ -25,13 +25,17 @@ TEST_RET(loopback_setup) {
                 return log_error_errno(r, "loopback: %m");
 
         log_info("> ipv6 main");
-        system("ip -6 route show table main");
+        /* <0 → fork error, ==0 → success, >0 → error in child */
+        assert_se(system("ip -6 route show table main") >= 0);
+
         log_info("> ipv6 local");
-        system("ip -6 route show table local");
+        assert_se(system("ip -6 route show table local") >=0);
+
         log_info("> ipv4 main");
-        system("ip -4 route show table main");
+        assert_se(system("ip -4 route show table main") >= 0);
+
         log_info("> ipv4 local");
-        system("ip -4 route show table local");
+        assert_se(system("ip -4 route show table local") >= 0);
 
         return EXIT_SUCCESS;
 }