about summary refs log tree commit diff
path: root/stdlib/test-canon.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/test-canon.c')
-rw-r--r--stdlib/test-canon.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stdlib/test-canon.c b/stdlib/test-canon.c
index 185ccf4f48..2ad1218749 100644
--- a/stdlib/test-canon.c
+++ b/stdlib/test-canon.c
@@ -174,7 +174,9 @@ do_test (int argc, char ** argv)
 	  continue;
 	}
 
-      if (!check_path (buf, tests[i].out ? tests[i].out : tests[i].resolved))
+      /* Only on success verify that buf contains the result too.  */
+      if (result != NULL
+	  && !check_path (buf, tests[i].out ? tests[i].out : tests[i].resolved))
 	{
 	  printf ("%s: flunked test %d (expected resolved `%s', got `%s')\n",
 		  argv[0], i, tests[i].out ? tests[i].out : tests[i].resolved,