[diffoscope] 01/01: Drop test_testing squashfs test; simply too unreliable and/or has too many requirements to satisfy (eg. shorter usernames) for it to not be skipped.

Chris Lamb chris at chris-lamb.co.uk
Sun Aug 14 16:00:18 CEST 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit 8812460a96edee4222fadf9bb7f0b9e178562a26
Author: Chris Lamb <lamby at debian.org>
Date:   Sun Aug 14 14:59:05 2016 +0100

    Drop test_testing squashfs test; simply too unreliable and/or has too many requirements to satisfy (eg. shorter usernames) for it to not be skipped.
---
 tests/comparators/test_squashfs.py           | 22 +---------------------
 tests/data/squashfs_listing_expected_diff.in | 11 -----------
 2 files changed, 1 insertion(+), 32 deletions(-)

diff --git a/tests/comparators/test_squashfs.py b/tests/comparators/test_squashfs.py
index 68f0af4..7ec7e07 100644
--- a/tests/comparators/test_squashfs.py
+++ b/tests/comparators/test_squashfs.py
@@ -18,15 +18,12 @@
 # along with diffoscope.  If not, see <http://www.gnu.org/licenses/>.
 
 import os.path
-import pwd
-import grp
 import pytest
-import multiprocessing
 from diffoscope.comparators import specialize
 from diffoscope.comparators.binary import FilesystemFile, NonExistingFile
 from diffoscope.comparators.squashfs import SquashfsFile
 from diffoscope.config import Config
-from conftest import tool_missing, try_except
+from conftest import tool_missing
 
 TEST_FILE1_PATH = os.path.join(os.path.dirname(__file__), '../data/test1.squashfs')
 TEST_FILE2_PATH = os.path.join(os.path.dirname(__file__), '../data/test2.squashfs')
@@ -60,23 +57,6 @@ def test_superblock(differences):
     expected_diff = open(os.path.join(os.path.dirname(__file__), '../data/squashfs_superblock_expected_diff')).read()
     assert differences[0].unified_diff == expected_diff
 
- at pytest.mark.skipif(try_except(lambda: 1000 not in {x.pw_uid for x in pwd.getpwall()}, True, KeyError), reason="No uid 1000")
- at pytest.mark.skipif(try_except(lambda: 1000 not in {x.gr_gid for x in grp.getgrall()}, True, KeyError), reason="No gid 1000")
- at pytest.mark.skipif(tool_missing('unsquashfs'), reason='missing unsquashfs')
-def test_listing(differences):
-    expected_diff = open(os.path.join(os.path.dirname(__file__), '../data/squashfs_listing_expected_diff.in')).read()
-    # Workaround #794096
-    user = pwd.getpwuid(1000).pw_name
-    group = grp.getgrgid(1000).gr_name
-    for x, y in (
-        ('$USER', user),
-        ('$GROUP', group),
-        ('$WHITESPACE', " " * (23 - len(user) - len(group))),
-        ('$NUM_PROCESSORS', str(multiprocessing.cpu_count())),
-    ):
-        expected_diff = expected_diff.replace(x, y)
-    assert differences[1].unified_diff == expected_diff
-
 @pytest.mark.skipif(tool_missing('unsquashfs'), reason='missing unsquashfs')
 def test_symlink(differences):
     assert differences[2].comment == 'symlink'
diff --git a/tests/data/squashfs_listing_expected_diff.in b/tests/data/squashfs_listing_expected_diff.in
deleted file mode 100644
index a4138fb..0000000
--- a/tests/data/squashfs_listing_expected_diff.in
+++ /dev/null
@@ -1,11 +0,0 @@
-@@ -1,7 +1,7 @@
- Parallel unsquashfs: Using $NUM_PROCESSORS processors
- 3 inodes (3 blocks) to write
- 
--drwxr-xr-x $USER/$GROUP$WHITESPACE 51 2015-06-24 14:47 
--lrwxrwxrwx $USER/$GROUP$WHITESPACE  6 2015-06-24 14:47 /link -> broken
-+drwxr-xr-x $USER/$GROUP$WHITESPACE 51 2015-06-24 14:50 
-+lrwxrwxrwx $USER/$GROUP$WHITESPACE 13 2015-06-24 14:50 /link -> really-broken
- crw-r--r-- root/root             1,  3 2015-06-24 14:47 /null
---rw-r--r-- $USER/$GROUP$WHITESPACE446 2015-06-24 14:49 /text
-+-rw-r--r-- $USER/$GROUP$WHITESPACE671 2015-06-24 14:49 /text

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list