]> sourceware.org Git - lvm2.git/commitdiff
The "should" testing utility should actually only give a warning when the
authorPetr Rockai <prockai@redhat.com>
Wed, 12 May 2010 05:55:42 +0000 (05:55 +0000)
committerPetr Rockai <prockai@redhat.com>
Wed, 12 May 2010 05:55:42 +0000 (05:55 +0000)
command fails.

test/not.c

index 7456dd7c42f347b31057dba7647be496cec799e1..6b17e59160b4d467fccaf0f9657dabd66fc2aa64 100644 (file)
@@ -8,7 +8,8 @@ int finished(const char *cmd, int status) {
        if (!strcmp(cmd, "not"))
                return !status;
        if (!strcmp(cmd, "should")) {
-               fprintf(stderr, "TEST WARNING: Ignoring command failure.\n");
+               if (status)
+                       fprintf(stderr, "TEST WARNING: Ignoring command failure.\n");
                return 0;
        }
        return 6;
This page took 1.206459 seconds and 5 git commands to generate.