yzgyyang / diffoscope Goto Github PK
View Code? Open in Web Editor NEWPorting diffoscope to FreeBSD
Home Page: https://salsa.debian.org/reproducible-builds/diffoscope.git
License: GNU General Public License v3.0
Porting diffoscope to FreeBSD
Home Page: https://salsa.debian.org/reproducible-builds/diffoscope.git
License: GNU General Public License v3.0
tests/comparators/test_git.py::test_diff FAILED
...
- Device ID: (0, 2054)
+ Device ID: (8, 6)
...
- Device ID: (0, 2054)
+ Device ID: (8, 6)
The reason being that the expected output assumed a "Device ID" which is not correct on FreeBSD. See a similar issue here: #1
tests/comparators/test_device.py::test_diff FAILED
tests/comparators/test_device.py::test_diff_reverse FAILED
The reason being that the expected output assumed that /dev/null
should always have .major:1 .minor:3
, however, in FreeBSD,
➜ ~ python3
Python 3.6.2 (default, Jul 18 2017, 01:40:45)
[GCC 4.2.1 Compatible FreeBSD Clang 4.0.0 (tags/RELEASE_400/final 297347)] on freebsd12
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> st = os.lstat('/dev/null')
>>> os.major(st.st_rdev)
0
>>> os.minor(st.st_rdev)
14
Due to the different behaviors between GNU diff and BSD diff, test suites will fail on ~5 cases when running on FreeBSD.
test_num_items
differences = []
@skip_unless_tools_exist('nm')
def test_num_items(differences):
> assert len(differences) == 4
E assert 0 == 4
E + where 0 = len([])
tests/comparators/test_rlib.py:74: AssertionError
Diffoscope test cases:
failed on my both FreeBSD (with cdrtools
) and Arch (with cdrkit
- genisoimage
). Is it true that in fact the expected outputs are wrong?
Here's the info from the tests/data/test1.iso
and tests/data/test2.iso
:
✗ isoinfo -l -i test1.iso
Setting input-charset to 'UTF-8' from locale.
Directory listing of /
dr-xr-xr-x 1 0 0 2048 Jun 24 2015 [ 23 02] .
dr-xr-xr-x 1 0 0 2048 Jun 24 2015 [ 23 02] ..
-r-xr-xr-x 1 0 0 0 Jun 24 2015 [ 25 00] LINK.;1
-r-xr-xr-x 1 0 0 0 Jun 24 2015 [ 25 00] NULL.;1
-r-xr-xr-x 1 0 0 446 Jun 24 2015 [ 25 00] TEXT.;1
✗ isoinfo -l -i test2.iso
Setting input-charset to 'UTF-8' from locale.
Directory listing of /
dr-xr-xr-x 1 0 0 2048 Jun 24 2015 [ 23 02] .
dr-xr-xr-x 1 0 0 2048 Jun 24 2015 [ 23 02] ..
-r-xr-xr-x 1 0 0 0 Jun 24 2015 [ 25 00] LINK.;1
-r-xr-xr-x 1 0 0 0 Jun 24 2015 [ 25 00] NULL.;1
-r-xr-xr-x 1 0 0 671 Jun 24 2015 [ 25 00] TEXT.;1
However, in the expected output:
✗ cat iso9660_content_expected_diff
@@ -1,7 +1,7 @@
Directory listing of /
d--------- 0 0 0 2048 Jun 24 2015 [ 23 02] .
d--------- 0 0 0 2048 Jun 24 2015 [ 23 02] ..
---------- 0 0 0 0 Jun 24 2015 [ 25 00] LINK.;1
---------- 0 0 0 0 Jun 24 2015 [ 25 00] NULL.;1
----------- 0 0 0 446 Jun 24 2015 [ 25 00] TEXT.;1
+---------- 0 0 0 671 Jun 24 2015 [ 25 00] TEXT.;1
I ran the test suite on both:
Company computer:
i5-3450 8G SSD
FreeBSD 12-CURRENT
My laptop:
i7-5500U 16G SSD
Arch Linux 201706
It takes 260s for the suite to finish on FreeBSD, and just 18s on my Arch Linux.
Will run the suite again with --durations=20
(list 20 slowest cases) and post the results here.
@emaste
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.