[netfilter-cvslog] r4407 - trunk/nfsim/core
rusty at netfilter.org
rusty at netfilter.org
Mon Oct 31 08:56:34 CET 2005
Author: rusty at netfilter.org
Date: 2005-10-31 08:56:28 +0100 (Mon, 31 Oct 2005)
New Revision: 4407
Modified:
trunk/nfsim/core/core.c
trunk/nfsim/core/core.h
trunk/nfsim/core/tui.c
Log:
Remove check_for_valgrind_errors: now scripts can be given on command line, you can use valgrind's --db-attach=yes option.
Speeds up test-kernel-source --valgrind a little (from 6:50 to 6:30, 20 secs)
Modified: trunk/nfsim/core/core.c
===================================================================
--- trunk/nfsim/core/core.c 2005-10-31 06:45:08 UTC (rev 4406)
+++ trunk/nfsim/core/core.c 2005-10-31 07:56:28 UTC (rev 4407)
@@ -155,7 +155,6 @@
char *hookname = talloc_asprintf(NULL, "%s:%i", __func__, hooknum);
nfsim_check_packet(*skb);
- check_for_valgrind_errors();
if (should_i_fail(hookname)) {
talloc_free(hookname);
@@ -290,29 +289,6 @@
}
cmdline_opt("help", 0, 'h', cmdline_help);
-static char *valgrind_file = NULL;
-
-static void cmdline_valgrind_file(struct option *opt)
-{
- valgrind_file = optarg;
-}
-
-/* Hack for valgrind: if only it just aborted on error... */
-void check_for_valgrind_errors(void)
-{
- struct stat st;
-
- if (!valgrind_file)
- return;
-
- if (stat(valgrind_file, &st) != 0)
- barf_perror("statting valgrind file %s", valgrind_file);
-
- if (st.st_size != 0)
- abort();
-}
-cmdline_opt("valgrind-file", 1, 0, cmdline_valgrind_file);
-
extern struct cmdline_option __start_cmdline[], __stop_cmdline[];
static struct cmdline_option *get_cmdline_option(int opt)
@@ -397,8 +373,6 @@
talloc_report_full(nfsim_tallocs, stderr);
barf("Resource leak");
}
-
- check_for_valgrind_errors();
}
static void initialize_builtin_modules(void)
Modified: trunk/nfsim/core/core.h
===================================================================
--- trunk/nfsim/core/core.h 2005-10-31 06:45:08 UTC (rev 4406)
+++ trunk/nfsim/core/core.h 2005-10-31 07:56:28 UTC (rev 4407)
@@ -289,9 +289,6 @@
/* If the test has a name, this is it. */
extern const char *nfsim_testname;
-/* Hack for valgrind */
-extern void check_for_valgrind_errors(void);
-
extern char *module_path;
enum exitcodes
{
Modified: trunk/nfsim/core/tui.c
===================================================================
--- trunk/nfsim/core/tui.c 2005-10-31 06:45:08 UTC (rev 4406)
+++ trunk/nfsim/core/tui.c 2005-10-31 07:56:28 UTC (rev 4407)
@@ -213,7 +213,6 @@
}
if (!do_post_commands(cmd->name))
ret = false;
- check_for_valgrind_errors();
return ret;
}
More information about the netfilter-cvslog
mailing list