]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/tests_pass_valgrind.c
base64: fix for unsigned chars (e.g. ARM).
[ccan] / tools / ccanlint / tests / tests_pass_valgrind.c
index d697cd981a1b19037781754c4cedb8634c4f7437..90e42349715f9ff2c0ef706e54123072f5f52212 100644 (file)
@@ -3,6 +3,7 @@
 #include <ccan/str/str.h>
 #include <ccan/take/take.h>
 #include <ccan/foreach/foreach.h>
+#include <ccan/tal/grab_file/grab_file.h>
 #include "tests_pass.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -157,7 +158,7 @@ static const char *concat(struct score *score, char *bits[])
 
 /* FIXME: Run examples, too! */
 static void do_run_tests_vg(struct manifest *m,
-                           unsigned int *timeleft,
+                           unsigned int *timeleft UNNEEDED,
                            struct score *score)
 {
        struct ccan_file *i;
@@ -180,7 +181,7 @@ static void do_run_tests_vg(struct manifest *m,
                                continue;
                        }
 
-                       output = tal_grab_file(i, i->valgrind_log, NULL);
+                       output = grab_file(i, i->valgrind_log);
                        /* No valgrind errors? */
                        if (!output || output[0] == '\0') {
                                err = NULL;
@@ -198,7 +199,7 @@ static void do_run_tests_vg(struct manifest *m,
 }
 
 static void do_leakcheck_vg(struct manifest *m,
-                           unsigned int *timeleft,
+                           unsigned int *timeleft UNNEEDED,
                            struct score *score)
 {
        struct ccan_file *i;
@@ -250,12 +251,13 @@ static void run_under_debugger_vg(struct manifest *m, struct score *score)
                return;
 
        first = list_top(&score->per_file_errors, struct file_error, list);
-       command = tal_fmt(m, "valgrind --leak-check=full --db-attach=yes%s %s",
+       command = tal_fmt(m, "valgrind --leak-check=full --db-attach=yes%s %s %s",
                          concat(score, per_file_options(&tests_pass_valgrind,
                                                         first->file)),
-                         first->file->compiled[COMPILE_NORMAL]);
-       if (system(command))
+                         valgrind_suppress, first->file->compiled[COMPILE_NORMAL]);
+       if (system(command)) {
                doesnt_matter();
+       }
 }
 
 struct ccanlint tests_pass_valgrind = {