Skip to content

Commit e4ac4b6

Browse files
committed
Test: Add test to verify ISO properly extracted w/ empty Joliet tree
Test files created with pycdlib and contain the ClamAV logo.png file.
1 parent fbdd12d commit e4ac4b6

4 files changed

Lines changed: 27 additions & 0 deletions

File tree

unit_tests/clamscan/assorted_test.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,29 @@ def test_pe_cert_trust_archive(self):
212212
unexpected_results = ['OK']
213213

214214
self.verify_output(output.out, expected=expected_results, unexpected=unexpected_results)
215+
216+
def test_iso_missing_joliet(self):
217+
self.step_name('Test that we correctly extract files from an ISO even if the joliet file path is empty.')
218+
219+
test_path = TC.path_source / 'unit_tests' / 'input' / 'other_scanfiles'
220+
sig_path = TC.path_source / 'unit_tests' / 'input' / 'other_sigs' / 'logo.hsb'
221+
222+
command = '{valgrind} {valgrind_args} {clamscan} \
223+
-d {sig_path} \
224+
--allmatch {testfile1} {testfile2}'.format(
225+
valgrind=TC.valgrind, valgrind_args=TC.valgrind_args, clamscan=TC.clamscan,
226+
sig_path=sig_path,
227+
testfile1=test_path / 'iso_normal.logo.iso',
228+
testfile2=test_path / 'iso_no_joliet.logo.iso',
229+
)
230+
output = self.execute_command(command)
231+
232+
assert output.ec == 1
233+
234+
expected_results = [
235+
'iso_normal.logo.iso: logo.png.UNOFFICIAL FOUND',
236+
'iso_no_joliet.logo.iso: logo.png.UNOFFICIAL FOUND',
237+
]
238+
unexpected_results = ['OK']
239+
240+
self.verify_output(output.out, expected=expected_results, unexpected=unexpected_results)
88 KB
Binary file not shown.
86 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
f083e9c704165003f8c065964e4ccb47da48bbad8a80521d571cbf0f1d4762c6:25476:logo.png

0 commit comments

Comments
 (0)