coregrind files shall use vg_assert not tl_assert.
Tool files shall use tl_assert not vg_assert.
Fix code accordingly.
Adapted check_headers_and_includes to make sure the code
stays clean in that respect.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14542 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/tests/check_headers_and_includes b/tests/check_headers_and_includes
index f234320..0215d49 100755
--- a/tests/check_headers_and_includes
+++ b/tests/check_headers_and_includes
@@ -10,6 +10,8 @@
# (4) tool *.[ch] files must not include pub_core_...h
# (5) include pub_core/tool_clreq.h instead of valgrind.h except in tools'
# export headers
+# (6) coregrind/ *.[ch] must not use tl_assert
+# (7) include/*.h must not use vg_assert
#-------------------------------------------------------------------
use strict;
@@ -205,6 +207,7 @@
#---------------------------------------------------------------------
sub check_coregrind_export_header {
my ($path_name) = @_;
+ my $file = basename($path_name);
foreach my $inc (get_included_files($path_name)) {
$inc = basename($inc);
@@ -217,6 +220,11 @@
error("File $path_name should include pub_tool_clreq.h instead of $inc\n");
}
}
+# Must not use vg_assert
+ my $assert = `grep vg_assert $file`;
+ if ($assert ne "") {
+ error("File $path_name must not use vg_assert\n");
+ }
}
#---------------------------------------------------------------------
@@ -241,6 +249,11 @@
error("File $path_name should include pub_core_clreq.h instead of $inc\n");
}
}
+# Must not use tl_assert
+ my $assert = `grep tl_assert $file`;
+ if ($assert ne "") {
+ error("File $path_name must not use tl_assert\n");
+ }
}
#---------------------------------------------------------------------
@@ -261,6 +274,11 @@
error("File $path_name should include pub_tool_clreq.h instead of $inc\n");
}
}
+# Must not use vg_assert
+ my $assert = `grep vg_assert $file`;
+ if ($assert ne "") {
+ error("File $path_name must not use vg_assert\n");
+ }
}
sub process_file {