Skip to content

Commit

Permalink
[tests] search for fixed strings, not regexps
Browse files Browse the repository at this point in the history
grep_for_content should search for a fixed string, not for regexp. The
reason is sos is unable to identify 1a2b3c4 as an IP address (which it
is not), but grep_for_content would raise false match against 1.2.3.4 .

Resolves: #3320

Signed-off-by: Pavel Moravec <[email protected]>
  • Loading branch information
pmoravec committed Jul 28, 2023
1 parent 0af74a8 commit 018d3a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/sos_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def grep_for_content(self, search):
"""Call out to grep for finding a specific string 'search' in any place
in the archive
"""
cmd = "grep -ril '%s' %s" % (search, self.archive_path)
cmd = "grep -rilF '%s' %s" % (search, self.archive_path)
try:
out = process.run(cmd)
rc = out.exit_status
Expand Down

0 comments on commit 018d3a0

Please sign in to comment.