Bug 1296654 - make check fails: FAIL: test-async-cancel
make check fails: FAIL: test-async-cancel
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gnome-vfs2 (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Ondrej Holy
Desktop QE
Depends On:
  Show dependency treegraph
Reported: 2016-01-07 13:41 EST by Bohdan Milar
Modified: 2016-05-10 16:05 EDT (History)
2 users (show)

See Also:
Fixed In Version: gnome-vfs2-2.24.2-8.el6
Doc Type: Bug Fix
Doc Text:
Cause: One of upstream tests fails sometime due to some race conditions in a code. Consequence: A whole upstream test suite doesn't pass sometime. Fix: The erroneous test is disabled. Result: The upstream test suite always pass.
Story Points: ---
Clone Of:
Last Closed: 2016-05-10 16:05:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0764 normal SHIPPED_LIVE gnome-vfs2 bug fix and enhancement update 2016-05-10 18:33:54 EDT

  None (edit)
Description Bohdan Milar 2016-01-07 13:41:06 EST
Description of problem:
Sometimes when I run upstream tests, one of them (test-async-cancel) fails.

Version-Release number of selected component (if applicable):

How reproducible:
Cca 35 %

Steps to Reproduce:
1. As root, install all dependencies (GConf2-devel libxml2-devel zlib-devel glib2-devel bzip2-devel ORBit2-devel openjade automake libtool intltool autoconf gtk-doc perl-XML-Parser libsmbclient-devel openssl-devel gamin-devel krb5-devel avahi-glib-devel hal-devel dbus-devel dbus-glib-devel libacl-devel libselinux-devel keyutils-libs-devel).
2. Get the gnome-vfs2 src rpm and put it to a regular user's home directory.
3. As regular user: mkdir ~/rpmbuild
4. As regular user: rpm2cpio ~/gnome-vfs2-*.el6.src.rpm | cpio -idmv
5. As regular user: cd ~/rpmbuild/BUILD/gnome-vfs-*/
6. As regular user: make check

Actual results:
Testing directory loads..** Message: test failed: load directory cancel 2: job never went away delay 1
FAIL: test-async-cancel
1 of 6 tests failed
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `/home/test/rpmbuild/BUILD/gnome-vfs-2.24.2/test'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/test/rpmbuild/BUILD/gnome-vfs-2.24.2/test'
make: *** [check-recursive] Error 1

Expected results:
PASS: test-async-cancel
All 6 tests passed

Additional info:
Bug is also reported at https://bugzilla.gnome.org/show_bug.cgi?id=618089
It looks strange to me that there are 35 tests available in the test directory but only 6 of them are run by "make check".
Comment 3 Ondrej Holy 2016-01-11 04:45:32 EST
I can reproduce similar failures. There are "synchronous" test cases, which call async gnome-vfs methods and waits for callbacks to set some flags. The wait is implemented following way:

for (i = 0; i < MAX_THREAD_WAIT; i++) {
        g_thread_yield ();
        g_main_context_iteration (NULL, FALSE);
        if (*wait_for_it) {
                return TRUE;

It seems the test cases fail, because the wait is not long enough. Errors can be eliminated if you increase MAX_THREAD_WAIT constant, however the constant needs to be increased a lot, e.g. 10000 to "be sure" that it doesn't fail. Maybe g_main_context_iteration, or g_thread_yield changed its behavioral a bit over the time. I don't know...
Comment 4 Bohdan Milar 2016-01-14 02:22:30 EST
OK, you can disable the test.
Comment 6 Bohdan Milar 2016-02-03 08:00:57 EST
Tested on x86_64 (VM).

Tested version:

Applied scenario:
- Get the gnome-vfs2 src rpm and put it to user's home directory.
- mkdir -p ~/rpmbuild/SOURCES
- cd ~/rpmbuild/SOURCES
- rpm2cpio ~/gnome-vfs2-*.el6.src.rpm | cpio -idmv
- rpmbuild -bc gnome-vfs2.spec
- cd ~/rpmbuild/BUILD/gnome-vfs-*/
- make check

PASS: test-acl
PASS: test-address
PASS: test-escape
PASS: test-uri
PASS: ./auto-test
All 5 tests passed
Comment 8 errata-xmlrpc 2016-05-10 16:05:50 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.