HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //lib/modules/6.17.0-1009-aws/build/tools/perf/tests/shell/common/check_all_patterns_found.pl
#!/usr/bin/perl
# SPDX-License-Identifier: GPL-2.0

@regexps = @ARGV;

$quiet = 1;
$quiet = 0 if (defined $ENV{TESTLOG_VERBOSITY} && $ENV{TESTLOG_VERBOSITY} ge 2);

%found = ();
$passed = 1;

while (<STDIN>)
{
	s/\n//;

	for $r (@regexps)
	{
		if (/$r/)
		{
			$found{$r} = 1;	# FIXME: maybe add counters -- how many times was the regexp matched
		}
	}
}

for $r (@regexps)
{
	unless (exists $found{$r})
	{
		print "Regexp not found: \"$r\"\n" unless $quiet;
		$passed = 0;
	}
}

exit ($passed == 0);