-
Notifications
You must be signed in to change notification settings - Fork 570
Closed
Closed
Copy link
Description
=========================== short test summary info ============================
FAILED test/test_scanner.py::TestScanner::test_version_in_package[https://nodejs.org/dist/v12.16.1/-node-v12.16.1-linux-x64.tar.xz-node.js-12.16.1]
FAILED test/test_scanner.py::TestScanner::test_version_in_package[http://www.rpmfind.net/linux/openmandriva/4.1/repository/x86_64/main/release/-python-3.8.1-3-omv4001.x86_64.rpm-python-3.8.1]
============ 2 failed, 396 passed, 3 skipped in 1275.53s (0:21:15) =============
At a glance, the issue may be related to the aio_run_command
change to handle errors better, since both of them seem to be throwing errors:
cve_bin_tool/version_scanner.py:252: in recursive_scan
yield from self.scan_and_or_extract_file(ectx, scan_path)
cve_bin_tool/version_scanner.py:240: in scan_and_or_extract_file
yield from self.scan_and_or_extract_file(ectx, filename)
cve_bin_tool/version_scanner.py:237: in scan_and_or_extract_file
for filename in self.walker([ectx.extract(filepath)]):
cve_bin_tool/extractor.py:212: in extract
return run_coroutine(self.aio_extract(filename))
cve_bin_tool/async_utils.py:47: in run_coroutine
result = loop.run_until_complete(aws)
/opt/hostedtoolcache/Python/3.8.10/x64/lib/python3.8/asyncio/base_events.py:616: in run_until_complete
return future.result()
cve_bin_tool/extractor.py:184: in aio_extract
if await extractor(filename, extracted_path) != 0:
cve_bin_tool/extractor.py:146: in extract_file_zip
stdout, stderr = await aio_run_command(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = ['unzip', '-n', '-d', '/tmp/cve-bin-tool-v7vc_nsw/term-size.exe.extracted', '/tmp/cve-bin-tool-v7vc_nsw/node-v12.16.1-....xz.tar.gz.extracted/node-v12.16.1-linux-x64/lib/node_modules/npm/node_modules/term-size/vendor/windows/term-size.exe']
async def aio_run_command(args):
process = await asyncio.create_subprocess_exec(
*args,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
)
stdout, stderr = await process.communicate()
if process.returncode != 0:
> raise subprocess.CalledProcessError(
args, process.returncode, output=stdout, stderr=stderr
)
E subprocess.CalledProcessError: <unprintable CalledProcessError object>
cve_bin_tool/async_utils.py:59: CalledProcessError
_ TestScanner.test_version_in_package[http://www.rpmfind.net/linux/openmandriva/4.1/repository/x86_64/main/release/-python-3.8.1-3-omv4001.x86_64.rpm-python-3.8.1] _
[gw2] linux -- Python 3.8.10 /opt/hostedtoolcache/Python/3.8.10/x64/bin/python
self = <test.test_scanner.TestScanner object at 0x7fdfeb1577f0>
url = 'http://www.rpmfind.net/linux/openmandriva/4.1/repository/x86_64/main/release/'
package_name = 'python-3.8.1-3-omv4001.x86_64.rpm', product = 'python'
version = '3.8.1'
Metadata
Metadata
Assignees
Labels
No labels