[diffoscope] Test failures without "tlsh" module

Fabian Keil fk at fabiankeil.de
Wed Jun 10 09:57:21 UTC 2020


I submitted a diffoscope update to 146 for FreeBSD and it was pointed
out by Kubilay Kocak that there are lots of errors during make test:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246773#c2

I could reproduce this and as noted by Kubilay, most of
them are caused by the no-tlsh-module warning which the
tests don't seem to expect.

tlsh hasn't been ported to FreeBSD yet.

Example:

      tests/test_excludes.py:52: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

      capsys = <_pytest.capture.CaptureFixture object at 0x809195c50>
      args = ('--exclude=*',), exc = <ExceptionInfo SystemExit tblen=2>, out = ''
      err = '2020-06-10 09:25:20 W: diffoscope.main: Fuzzy-matching is currently disabled as the "tlsh" module is unavailable.\n'

          def run(capsys, *args):
              with pytest.raises(SystemExit) as exc:
                  main(
                      args
                      + tuple(
                          os.path.join(os.path.dirname(__file__), "data", x)
                          for x in ("test1.tar", "test2.tar")
                      )
                  )

              out, err = capsys.readouterr()

      >       assert err == ""
      E       assert '2020-06-10 0...navailable.\n' == ''
      E         - 2020-06-10 09:25:20 W: diffoscope.main: Fuzzy-matching is currently disabled as the "tlsh" module is unavailable.

Overall there are 45 failed tests.

The full "make test" output is available at:
https://www.fabiankeil.de/tmp/diffoscope-146-tests.txt

Note that there are also "list index out of range" errors
which may be unrelated:

     tests/comparators/test_elf.py:136: AssertionError
     __________________________ test_ignore_readelf_errors __________________________

     ignore_readelf_errors_differences = []

         @skip_unless_tools_exist("readelf")
         @skip_if_tool_version_is("readelf", readelf_version, "2.29")
         @skip_if_binutils_does_not_support_x86()
         def test_ignore_readelf_errors(ignore_readelf_errors_differences):
             expected_diff = get_data("ignore_readelf_errors_expected_diff")
     >       assert ignore_readelf_errors_differences[0].unified_diff == expected_diff
     E       IndexError: list index out of range

Is the missing "tlsh" module really important enough to
show the warning every time diffoscope is executed?

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.reproducible-builds.org/pipermail/diffoscope/attachments/20200610/be1ddad1/attachment.sig>


More information about the diffoscope mailing list