]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
testsuite/test-modprobe: reinstate chdir error path
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 20 Jun 2025 10:11:04 +0000 (11:11 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 27 Jun 2025 16:02:55 +0000 (11:02 -0500)
Earlier commit used a global sed to remove the no-longer needed
exit(EXIT_FAILURE) calls. In the process it also removed one instance
in the error path, which should remain.

Fixes: e09acf2e ("testsuite: remove exit from EXEC_TOOL tests")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/379
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
testsuite/test-modprobe.c

index 92b1dc50433da728404d8f8d095ad7e0493ac958..d48686fc6b82d6edb7a3a8784ebe4ea7b0d35686 100644 (file)
@@ -395,6 +395,7 @@ static int modprobe_module_from_relpath(void)
 {
        if (chdir("/home/foo") != 0) {
                perror("failed to change into /home/foo");
+               return EXIT_FAILURE;
        }
 
        return EXEC_TOOL(modprobe, "./mod-simple.ko");