Bug#855092: beets: FTBFS randomly (failing tests)
Hi Carl, Santiago, Just passing by, but I suspect that Carl doesn't know that bugs in the Debian BTS are not automatically forwarded to the submitter of the bug. Hence, doing so now. Santiago, maybe the third item leaves something for you to comment on? On Thu, 30 May 2019 17:07:25 +1000 Carl Suster wrote: > Hi, > > I'm an upstream contributor to beets and I was looking into the failures > you're seeing here. I'm interested in making these tests reliable. > > I tried to build the package on my (sid) laptop using sbuild and the > latest packaging repo from salsa. I'm not able to reproduce these test > failures. If I remove the Debian patches disabling tests, I'm still not > able to reproduce any of the failures that led you to add those patches > in the first case. I'm seeing three categories of tests here: > >1) The test in skip-broken-test. If the failure you're seeing is the > same error on the GitHub issue you mention in that patch > ('musicbrainz.host'), then my suspicion is that when running the test > beets is unable to find/read the file beets/config_default.yaml. One way > this can happen is if beets is being invoked as a zipped egg rather than > unpacked source (unsupported). Otherwise it might be that the build > environment has paths set in an unusual way that interferes with beets' > mechanism to find that YAML file relative to the invoked module. > >2) There are two tests failing due to filesystem access > (test_no_write_permission and test_add_tags). Maybe we can do a better > job of mocking here so that the actual filesystem isn't being tested. > I'll take a look. > >3) The two test_import_task_created* tests exercise a feature based > on a coroutine implementation (beets.util.pipeline), so I wonder if > that's related? It's the only unusual thing I can think of off-hand. I > know that the Debian build infrastructure is a little unusual, but I'm > not sure what specifically the difference could be here. > > If you can help point me in the right direction to reproduce these > issues that would be appreciated. > > Cheers, > Carl > > Paul signature.asc Description: OpenPGP digital signature
Bug#855092: beets: FTBFS randomly (failing tests)
Hi, I'm an upstream contributor to beets and I was looking into the failures you're seeing here. I'm interested in making these tests reliable. I tried to build the package on my (sid) laptop using sbuild and the latest packaging repo from salsa. I'm not able to reproduce these test failures. If I remove the Debian patches disabling tests, I'm still not able to reproduce any of the failures that led you to add those patches in the first case. I'm seeing three categories of tests here: 1) The test in skip-broken-test. If the failure you're seeing is the same error on the GitHub issue you mention in that patch ('musicbrainz.host'), then my suspicion is that when running the test beets is unable to find/read the file beets/config_default.yaml. One way this can happen is if beets is being invoked as a zipped egg rather than unpacked source (unsupported). Otherwise it might be that the build environment has paths set in an unusual way that interferes with beets' mechanism to find that YAML file relative to the invoked module. 2) There are two tests failing due to filesystem access (test_no_write_permission and test_add_tags). Maybe we can do a better job of mocking here so that the actual filesystem isn't being tested. I'll take a look. 3) The two test_import_task_created* tests exercise a feature based on a coroutine implementation (beets.util.pipeline), so I wonder if that's related? It's the only unusual thing I can think of off-hand. I know that the Debian build infrastructure is a little unusual, but I'm not sure what specifically the difference could be here. If you can help point me in the right direction to reproduce these issues that would be appreciated. Cheers, Carl
Bug#855092: beets: FTBFS randomly (failing tests)
tags 855092 + patch thanks Dear Stefano: I did a "grep FAIL:" on the build logs and found that only three tests are to blame for the build failures I'm experiencing. If the package works ok "as is" and the failing tests do not mean that the package is broken, please consider applying the patch below for buster. If you want to debug the failing tests and see why they fail, please contact me privately and I will gladly offer ssh access to a machine where it happens very easily. Thanks. diff -Nru beets-1.4.7/debian/changelog beets-1.4.7/debian/changelog --- beets-1.4.7/debian/changelog2018-08-20 17:55:31.0 +0200 +++ beets-1.4.7/debian/changelog2019-04-21 18:30:42.0 +0200 @@ -1,3 +1,11 @@ +beets (1.4.7-3) unstable; urgency=medium + + [ Santiago Vila ] + * Add patch skip-more-unreliable-tests to fix a FTBFS problem which +happens randomly in some build environments. (Closes: #855092) + + -- Stefano Rivera Sun, 21 Apr 2019 18:30:42 +0200 + beets (1.4.7-2) unstable; urgency=medium * Use py3versions -s in autopkgtests, now that X-Python3-Version is dropped. diff -Nru beets-1.4.7/debian/patches/series beets-1.4.7/debian/patches/series --- beets-1.4.7/debian/patches/series 2018-08-20 17:55:31.0 +0200 +++ beets-1.4.7/debian/patches/series 2019-04-21 18:26:16.0 +0200 @@ -3,3 +3,4 @@ skip-broken-test py37-compat skip-unreliable-tests +skip-more-unreliable-tests diff -Nru beets-1.4.7/debian/patches/skip-more-unreliable-tests beets-1.4.7/debian/patches/skip-more-unreliable-tests --- beets-1.4.7/debian/patches/skip-more-unreliable-tests 1970-01-01 01:00:00.0 +0100 +++ beets-1.4.7/debian/patches/skip-more-unreliable-tests 2019-04-21 18:30:42.0 +0200 @@ -0,0 +1,37 @@ +From: Santiago Vila +Date: Sun, 21 Apr 2019 18:25:00 +0200 +Subject: skip more unreliable tests + +--- + test/test_plugins.py| 2 ++ + test/test_thumbnails.py | 1 + + 2 files changed, 3 insertions(+) + +--- a/test/test_plugins.py b/test/test_plugins.py +@@ -211,6 +211,7 @@ + self.__copy_file(dest_path, metadata) + self.file_paths.append(dest_path) + ++@unittest.skip('unreliable') + def test_import_task_created(self): + import_files = [self.import_dir] + self._setup_import_session(singletons=False) +@@ -233,6 +234,7 @@ + u' {0}'.format(displayable_path(self.file_paths[1])), + ]) + ++@unittest.skip('unreliable') + def test_import_task_created_with_plugin(self): + class ToSingletonPlugin(plugins.BeetsPlugin): + def __init__(self): +--- a/test/test_thumbnails.py b/test/test_thumbnails.py +@@ -49,6 +49,7 @@ + + @patch('beetsplug.thumbnails.ThumbnailsPlugin._check_local_ok') + @patch('beetsplug.thumbnails.os.stat') ++@unittest.skip('unreliable') + def test_add_tags(self, mock_stat, _): + plugin = ThumbnailsPlugin() + plugin.write_metadata = Mock()
Bug#855092: beets: FTBFS randomly (failing tests)
Hello Stefano. You wrote this in the changelog: * Skip some tests that seem to commonly fail in builds / autopkgtests, and are causing more annoyance than value. This will probably need to be extended. Indeed, it needs to be extended. Here is an updated bunch of build logs for the current version: https://people.debian.org/~sanvila/build-logs/beets/ Thanks.
Bug#855092: beets: FTBFS randomly (failing tests)
Package: src:beets Version: 1.3.19-2.1 Severity: important Dear maintainer: I tried to build this package in stretch with "dpkg-buildpackage -A" but it failed: [...] debian/rules build-indep dh build-indep --with python2,sphinxdoc dh_testdir -i dh_update_autotools_config -i dh_auto_configure -i debian/rules override_dh_auto_build make[1]: Entering directory '/<>' dh_auto_build python setup.py build --force running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/beets [... snipped ...] artist: composer -> coverArtist Really modify, move and write tags? (yes/no) composer - album - Tracktitle0 artist: composer -> coverArtist Really modify, move and write tags? (yes/no) composer - album - Tracktitle4 artist: composer -> coverArtist Really modify, move and write tags? (yes/no) composer - album - Tracktitle5 artist: composer -> coverArtist Really modify, move and write tags? (yes/no) Modifying 1 items. the artist - älbum - tïtle 0 flexattr: testAttr Really modify, move and write tags? (Yes/no/select) Modifying 1 items. the artist - älbum - tïtle 0 title: tïtle 0 -> newTitle Really modify, move and write tags? (Yes/no/select) Modifying 1 items. the artist - älbum - tïtle 0 initial_key: -> C#m Really modify, move and write tags? (Yes/no/select) - - min title: min -> a new title encoder: iTunes v7.6.2 -> rg_track_gain: 0.0 -> 0.0 artist: -> the ärtist album: -> the älbum rg_track_peak: 0.0 -> 0.0 - - min title: min -> new title error: Test failed: debian/rules:12: recipe for target 'override_dh_auto_test' failed make[1]: *** [override_dh_auto_test] Error 1 make[1]: Leaving directory '/<>' debian/rules:4: recipe for target 'build-indep' failed make: *** [build-indep] Error 2 dpkg-buildpackage: error: debian/rules build-indep gave error exit status 2 This is just how the build ends, not necessarily the relevant part. I've put several build logs here: https://people.debian.org/~sanvila/build-logs/beets/ If this is really a bug in one of the build-depends, please use reassign and affects, so that this is still visible in the page for this package. The bug should be reproducible with sbuild on a single CPU virtual machine, provided you try enough times (as the failure happens randomly). Thanks.