Browse Source

failtest: fix history when --failpath used

Correctly mark which calls we failed.
Rusty Russell 15 years ago
parent
commit
0d66a226c9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      ccan/failtest/failtest.c

+ 2 - 1
ccan/failtest/failtest.c

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