Skip to content

feat: basic tests and doc changes for no-scan mode #5138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

joydeep049
Copy link
Contributor

Related Discussion : #5136

cc @terriko @anthonyharrison @mastersans

assert result.returncode == 0


def test_no_scan_output():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like this particular test is failing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Initially I tried cve-bin-tool <directory> --no-scan but that failed
Then I changed the entry point to cve_bin_tool/cli.py but that seems to fail too

Surprising how --no-scan shows up in python3 cve_bin_tool/cli.py --help but not in the above

@joydeep049
Copy link
Contributor Author

Re-running the tests with an empty commit because:
12 06 2025_22 35 43_REC

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: still failing:

 =========================== short test summary info ===========================
FAILED test/test_no_scan.py::test_normal_scan - TypeError: argument of type 'NoneType' is not iterable
===== 1 failed, 2275 passed, 48 skipped, 8 warnings in 3420.69s (0:57:00) =====

There's also a pyupgrade linter fail so you should probably run that and see what got deprecated.

@stvml
Copy link
Contributor

stvml commented Jun 13, 2025

Looks like this might be the underlying issue that caused the failure:

test/test_no_scan.py::test_normal_scan
  C:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\site-packages\_pytest\threadexception.py:58: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-5 (_readerthread)
  
  Traceback (most recent call last):
    File "C:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\threading.py", line 1075, in _bootstrap_inner
      self.run()
    File "C:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\threading.py", line 1012, in run
      self._target(*self._args, **self._kwargs)
    File "C:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\subprocess.py", line 1599, in _readerthread
      buffer.append(fh.read())
                    ^^^^^^^^^
    File "C:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\encodings\cp1252.py", line 23, in decode
      return codecs.charmap_decode(input,self.errors,decoding_table)[0]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 21620: character maps to <undefined>

Possibly a text encoding problem on Windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants