summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-03-06 02:59:57 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-03-06 02:59:57 +0000
commit57a4688c4edfb6ba2acc52a6f1fb8d6e976699a8 (patch)
tree8678e397248399dcdd892d81039c3ac3a631ab26
parent3c039f47935cf401e58858712d8533229ad6bb13 (diff)
downloadATCD-57a4688c4edfb6ba2acc52a6f1fb8d6e976699a8.tar.gz
ChangeLogTag:Mon Mar 5 18:58:32 2001 Fuzz Master D <brunsch@uci.edu>
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLogs/ChangeLog-02a7
-rw-r--r--ChangeLogs/ChangeLog-03a7
-rwxr-xr-xbin/fuzz.pl67
4 files changed, 86 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c6bf4ff795..15db59b7620 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Mar 5 18:58:32 2001 Fuzz Master D <brunsch@uci.edu>
+
+ * bin/fuzz.pl:
+
+ Fixed some false positives in the resolve_initial_reference
+ test and also added an ACE_CHECK test by Carlos's request.
+
Mon Mar 5 18:54:42 2001 Darrell Brunsch <brunsch@uci.edu>
* bin/PerlACE/Process_Unix.pm:
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 3c6bf4ff795..15db59b7620 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,10 @@
+Mon Mar 5 18:58:32 2001 Fuzz Master D <brunsch@uci.edu>
+
+ * bin/fuzz.pl:
+
+ Fixed some false positives in the resolve_initial_reference
+ test and also added an ACE_CHECK test by Carlos's request.
+
Mon Mar 5 18:54:42 2001 Darrell Brunsch <brunsch@uci.edu>
* bin/PerlACE/Process_Unix.pm:
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 3c6bf4ff795..15db59b7620 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,10 @@
+Mon Mar 5 18:58:32 2001 Fuzz Master D <brunsch@uci.edu>
+
+ * bin/fuzz.pl:
+
+ Fixed some false positives in the resolve_initial_reference
+ test and also added an ACE_CHECK test by Carlos's request.
+
Mon Mar 5 18:54:42 2001 Darrell Brunsch <brunsch@uci.edu>
* bin/PerlACE/Process_Unix.pm:
diff --git a/bin/fuzz.pl b/bin/fuzz.pl
index 628c9d5753a..e07c24ac181 100755
--- a/bin/fuzz.pl
+++ b/bin/fuzz.pl
@@ -652,12 +652,14 @@ sub check_for_missing_rir_env ()
$disable = 0;
}
if ($disable == 0) {
- if (m/try\s*\{/) {
+ next if m/^\s*\/\//;
+
+ if (m/^\s*try/) {
$disable = 1;
next;
}
- if (m/resolve_initial_references\s*\(/) {
+ if (m/[^\:]resolve_initial_references\s*\(/) {
$found_env = 0;
$in_rir = 1;
}
@@ -686,7 +688,67 @@ sub check_for_missing_rir_env ()
}
}
+# This test checks for usage of ACE_CHECK/ACE_TRY_CHECK
+sub check_for_ace_check ()
+{
+ print "Running ACE_CHECK check\n";
+ foreach $file (@files_cpp, @files_inl) {
+ my $line = 0;
+ if (open (FILE, $file)) {
+ my $disable = 0;
+ my $in_func = 0;
+ my $in_return = 0;
+ my $found_env = 0;
+
+ print "Looking at file $file\n" if $opt_d;
+ while (<FILE>) {
+ ++$line;
+ if (/FUZZ\: disable check_for_ace_check/) {
+ $disable = 1;
+ }
+ if (/FUZZ\: enable check_for_ace_check/) {
+ $disable = 0;
+ }
+
+ next if m/^\s*\/\//;
+ next if m/^\s*$/;
+
+ if ($disable == 0) {
+ if (m/[,\(]\s*ACE_TRY_ENV[,\)]/) {
+ $found_env = 1;
+ $in_func = 1;
+ $env_line = $line;
+ }
+ if (m/ACE_TRY_ENV.*ACE_TRY_ENV/) {
+ print_error ("Multiple ACE_TRY_ENV in $file ($line)");
+ }
+
+ if ($in_func && m/\)/) {
+ $in_func = 0;
+ }
+ elsif (!$in_func && $found_env) {
+ if (!m/_CHECK/ && !m/^\}/ && !$in_return) {
+ print_error ("Missing ACE_CHECK/ACE_TRY_CHECK for $file ($env_line)");
+ }
+ $found_env = 0;
+ }
+
+ if (m/^\s*return/) {
+ $in_return = 1;
+ }
+ else {
+ $in_return = 0;
+ }
+ }
+ }
+ close (FILE);
+ }
+ else {
+ print STDERR "Error: Could not open $file\n";
+ }
+ }
+}
##############################################################################
@@ -737,6 +799,7 @@ check_for_bad_run_test () if ($opt_l >= 6);
check_for_absolute_ace_wrappers () if ($opt_l >= 3);
check_for_bad_ace_trace () if ($opt_l >= 4);
check_for_missing_rir_env () if ($opt_l >= 5);
+check_for_ace_check () if ($opt_l >= 3);
print "\nFuzz.pl - $errors error(s), $warnings warning(s)\n";