Bug 1296654

Summary: make check fails: FAIL: test-async-cancel
Product: Red Hat Enterprise Linux 6 Reporter: Bohdan Milar <bmilar>
Component: gnome-vfs2Assignee: Ondrej Holy <oholy>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8CC: bmilar, jkoten
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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: Environment:
Last Closed: 2016-05-10 20:05:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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

Version-Release number of selected component (if applicable):
gnome-vfs2-2.24.2-7.el6.x86_64

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 09:45:32 UTC
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 07:22:30 UTC
OK, you can disable the test.

Comment 6 Bohdan Milar 2016-02-03 13:00:57 UTC
Tested on x86_64 (VM).

Tested version:
gnome-vfs2-2.24.2-8.el6.src.rpm

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

Results:
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 20:05:50 UTC
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.

https://rhn.redhat.com/errata/RHBA-2016-0764.html