failtest: fix history when --failpath used
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 15 Feb 2011 12:32:16 +0000 (23:02 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 15 Feb 2011 12:32:16 +0000 (23:02 +1030)
Correctly mark which calls we failed.

ccan/failtest/failtest.c

index a9e1aa49887e0b97b4a4be7c89aeb5c8271e9d24..4b5ab10ada23714123f65cfaf24f2e6a3909a72f 100644 (file)
@@ -265,7 +265,8 @@ static bool should_fail(struct failtest_call *call)
                if (tolower(*failpath) != info_to_arg[call->type])
                        errx(1, "Failpath expected '%c' got '%c'\n",
                             info_to_arg[call->type], *failpath);
-               return isupper(*(failpath++));
+               call->fail = isupper(*(failpath++));
+               return call->fail;
        }
 
        if (!failtest_hook(history, history_num)) {