Improve type matcher debug so we can see what it does match. As part
of this move us to to using the common debug framework.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
my $tree = 1;
my $chk_signoff = 1;
my $chk_patch = 1;
my $tree = 1;
my $chk_signoff = 1;
my $chk_patch = 1;
my $tst_only;
my $emacs = 0;
my $terse = 0;
my $tst_only;
my $emacs = 0;
my $terse = 0;
'summary-file!' => \$summary_file,
'debug=s' => \%debug,
'summary-file!' => \$summary_file,
'debug=s' => \%debug,
- 'test-type!' => \$tst_type,
'test-only=s' => \$tst_only,
) or exit;
'test-only=s' => \$tst_only,
) or exit;
my $dbg_values = 0;
my $dbg_possible = 0;
my $dbg_values = 0;
my $dbg_possible = 0;
for my $key (keys %debug) {
eval "\${dbg_$key} = '$debug{$key}';"
}
for my $key (keys %debug) {
eval "\${dbg_$key} = '$debug{$key}';"
}
if ($line=~/^[^\+]/) {next;}
# TEST: allow direct testing of the type matcher.
if ($line=~/^[^\+]/) {next;}
# TEST: allow direct testing of the type matcher.
- if ($tst_type && $line =~ /^.$Declare$/) {
- ERROR("TEST: is type $Declare\n" . $herecurr);
+ if ($dbg_type) {
+ if ($line =~ /^.\s*$Declare\s*$/) {
+ ERROR("TEST: is type\n" . $herecurr);
+ } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
+ ERROR("TEST: is not type ($1 is)\n". $herecurr);
+ }