GNOME Bugzilla – Bug 722360
make check fails
Last modified: 2014-02-23 05:48:21 UTC
Created attachment 266494 [details] test-suite.log file from 'make check' ============================================================================ Testsuite summary for glib 2.38.2 ============================================================================ # TOTAL: 76 # PASS: 75 # SKIP: 0 # XFAIL: 0 # FAIL: 1 # XPASS: 0 # ERROR: 0 ============================================================================ See glib/tests/test-suite.log Please report to http://bugzilla.gnome.org/enter_bug.cgi?product=glib ============================================================================ make[7]: *** [test-suite.log] Error 1 make[7]: Leaving directory `/home/todds/dist/glib-2.38.2/glib/tests' make[6]: *** [check-TESTS] Error 2 make[6]: Leaving directory `/home/todds/dist/glib-2.38.2/glib/tests' make[5]: *** [check-am] Error 2 make[5]: Leaving directory `/home/todds/dist/glib-2.38.2/glib/tests' make[4]: *** [check] Error 2 make[4]: Leaving directory `/home/todds/dist/glib-2.38.2/glib/tests' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory `/home/todds/dist/glib-2.38.2/glib' make[2]: *** [check] Error 2 make[2]: Leaving directory `/home/todds/dist/glib-2.38.2/glib' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/home/todds/dist/glib-2.38.2' make: *** [check] Error 2 [todds@voyager2]# pwd /home/todds/dist/glib-2.38.2
Comment on attachment 266494 [details] test-suite.log file from 'make check' hi. Thanks for the report. Can you please provide a bit more information about the environment under which this failure occurred? (OS type, version, etc.) Thanks in advance.
(In reply to comment #0) > Created an attachment (id=266494) [details] > test-suite.log file from 'make check' > > ============================================================================ > Testsuite summary for glib 2.38.2 > ============================================================================ > # TOTAL: 76 > # PASS: 75 > # SKIP: 0 > # XFAIL: 0 > # FAIL: 1 > # XPASS: 0 > # ERROR: 0 > ============================================================================ > See glib/tests/test-suite.log > Please report to http://bugzilla.gnome.org/enter_bug.cgi?product=glib > ============================================================================ > make[7]: *** [test-suite.log] Error 1 > make[7]: Leaving directory `/home/todds/dist/glib-2.38.2/glib/tests' > make[6]: *** [check-TESTS] Error 2 > make[6]: Leaving directory `/home/todds/dist/glib-2.38.2/glib/tests' > make[5]: *** [check-am] Error 2 > make[5]: Leaving directory `/home/todds/dist/glib-2.38.2/glib/tests' > make[4]: *** [check] Error 2 > make[4]: Leaving directory `/home/todds/dist/glib-2.38.2/glib/tests' > make[3]: *** [check-recursive] Error 1 > make[3]: Leaving directory `/home/todds/dist/glib-2.38.2/glib' > make[2]: *** [check] Error 2 > make[2]: Leaving directory `/home/todds/dist/glib-2.38.2/glib' > make[1]: *** [check-recursive] Error 1 > make[1]: Leaving directory `/home/todds/dist/glib-2.38.2' > make: *** [check] Error 2 > [todds@voyager2]# pwd > /home/todds/dist/glib-2.38.2 =============================================================================== Hi Ryan, Here's the additional information that you requested: My system is a VERY "stock" CentOS v5.10 with all of the updates applied. [todds@voyager2]# cat /etc/redhat-release CentOS release 5.10 (Final) [todds@voyager2]# uname -a Linux voyager2 2.6.18-371.3.1.el5 #1 SMP Thu Dec 5 12:47:01 EST 2013 i686 i686 i386 GNU/Linux gcc: no input files [todds@voyager2]# gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I was trying to compile pidgin and it said that I needed a version of glib 2.16 or newer so I compiled all of the dependencies for glib-2.38.2 and then I compiled glib-2.38.2 by running: ./configure make make check I hope this information helps.
(In reply to comment #2) > Linux voyager2 2.6.18-371.3.1.el5 #1 SMP Thu Dec 5 12:47:01 EST 2013 i686 i686 Quite an old kernel there... GLib:ERROR:mappedfile.c:54:test_device: assertion failed: (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_INVAL) || g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOMEM)) I bet it's returning an error code other than one of those two. Can you find out what error it's returning by adding g_assert_no_error() just before line 54 in mappedfile.c? That should cause it to print the error message. Thanks in advance.
(In reply to comment #3) > (In reply to comment #2) > > Linux voyager2 2.6.18-371.3.1.el5 #1 SMP Thu Dec 5 12:47:01 EST 2013 i686 i686 > > Quite an old kernel there... > > GLib:ERROR:mappedfile.c:54:test_device: assertion failed: (g_error_matches > (error, G_FILE_ERROR, G_FILE_ERROR_INVAL) || g_error_matches (error, > G_FILE_ERROR, G_FILE_ERROR_NOMEM)) > > I bet it's returning an error code other than one of those two. Can you find > out what error it's returning by adding g_assert_no_error() just before line 54 > in mappedfile.c? That should cause it to print the error message. > > Thanks in advance. ============================================================================== Do you want me to add: g_assert_no_error(); OR g_assert_no_error( error ); ??? ==============================================================================
I couldn't get it to compile with 'g_assert_no_error();' just before line 54. With 'g_assert_no_error( error );' inserted just before line 54, I get the following ERROR message: Modification (excerpt) to glib/tests/mappedfile.c file: file = g_mapped_file_new ("/dev/null", FALSE, &error); /* g_assert_no_error(); */ g_assert_no_error (error); g_assert (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_INVAL) || g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOMEM)); ============================================ glib 2.38.2: glib/tests/test-suite.log ============================================ # TOTAL: 76 # PASS: 75 # SKIP: 0 # XFAIL: 0 # FAIL: 1 # XPASS: 0 # ERROR: 0 .. contents:: :depth: 2 FAIL: mappedfile ================ # random seed: R02Sca36e601dd0c61f36f6d5ab542031abc # Start of mappedfile tests ok 1 /mappedfile/basic ok 2 /mappedfile/empty ** GLib:ERROR:mappedfile.c:54:test_device: assertion failed (error == NULL): Failed to map /dev/null' /dev/null': mmap() failed: No such device (g-file-error-quark, 7) # GLib:ERROR:mappedfile.c:54:test_device: assertion failed (error == NULL): Failed to map /dev/null' /dev/null': mmap() failed: No such device (g-file-error-quark, 7) ../../tap-test: line 5: 12419 Aborted $1 -k --tap
hmm, not sure we really want to add code to our testsuite to deal with situations like 'no /dev/null'
It may not be missing /dev/null but rather /dev/null (being a character device) not supporting mmap with that kernel version and reporting that fact using a strange error code... Indeed, reading the code shows that this message comes from a branch where mmap() returns MAP_FAILED. Weird kernel...
(In reply to comment #7) > It may not be missing /dev/null but rather /dev/null (being a character device) > not supporting mmap with that kernel version and reporting that fact using a > strange error code... > > Indeed, reading the code shows that this message comes from a branch where > mmap() returns MAP_FAILED. > > Weird kernel... There's definitely a '/dev/null' file: [root@voyager2]# l /dev/null crw-rw-rw- 1 root root 1, 3 Dec 12 20:22 /dev/null [root@voyager2]# cat /etc/passwd > /dev/null
Created attachment 268045 [details] [review] tests: mappedfile: allow ENOENT error mmap() on /dev/null returns ENOENT on old Linux versions, so accept that in our testcase. This is not a case of open() returning that "/dev/null" is missing. This is the mmap() syscall returning ENOENT. We don't have a way to check the difference, unfortunately.
Can you test this patch please?
Hi Ryan, I'm in no way an expert at this, and since I didn't see any well defined procedure from you, here's what I did: cd glib-2.38.2/glib/tests vi patch_mappedfile.c and added the following lines [todds@voyager2]# cat patch_mappedfile.c --- glib/tests/mappedfile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c index 99c26c9..cc93a78 100644 --- a/glib/tests/mappedfile.c +++ b/glib/tests/mappedfile.c @@ -54,6 +54,7 @@ test_device (void) file = g_mapped_file_new ("/dev/null", FALSE, &error); g_assert (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_INVAL) || + g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT) || /* Old Linux kernels... */ g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOMEM)); g_assert (file == NULL); g_error_free (error); -- 1.8.5.3 [todds@voyager2]# cat patch_mappedfile.c | patch [todds@voyager2]# diff mappedfile.c_orig mappedfile.c 53a54 > g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT) || /* Old Linux kernels... */ [todds@voyager2]# cd ../.. [todds@voyager2]# pwd /home/todds/dist/glib-2.38.2 [todds@voyager2]# make check Results ------- ... PASS: mainloop FAIL: mappedfile PASS: markup-parse ... ============================================================================ Testsuite summary for glib 2.38.2 ============================================================================ # TOTAL: 76 # PASS: 75 # SKIP: 0 # XFAIL: 0 # FAIL: 1 # XPASS: 0 # ERROR: 0 ============================================================================ See glib/tests/test-suite.log Please report to http://bugzilla.gnome.org/enter_bug.cgi?product=glib ============================================================================ make[7]: *** [test-suite.log] Error 1 make[7]: Leaving directory `/home/todds/dist/glib-2.38.2/glib/tests' make[6]: *** [check-TESTS] Error 2 make[6]: Leaving directory `/home/todds/dist/glib-2.38.2/glib/tests' make[5]: *** [check-am] Error 2 make[5]: Leaving directory `/home/todds/dist/glib-2.38.2/glib/tests' make[4]: *** [check] Error 2 make[4]: Leaving directory `/home/todds/dist/glib-2.38.2/glib/tests' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory `/home/todds/dist/glib-2.38.2/glib' make[2]: *** [check] Error 2 make[2]: Leaving directory `/home/todds/dist/glib-2.38.2/glib' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/home/todds/dist/glib-2.38.2' make: *** [check] Error 2 ------------------------------------------------------------------------------ vi glib/tests/test-suite.log ============================================ glib 2.38.2: glib/tests/test-suite.log ============================================ # TOTAL: 76 # PASS: 75 # SKIP: 0 # XFAIL: 0 # FAIL: 1 # XPASS: 0 # ERROR: 0 .. contents:: :depth: 2 FAIL: mappedfile ================ # random seed: R02Seaaf48aadcb226fb66365caf41a22295 # Start of mappedfile tests ok 1 /mappedfile/basic ok 2 /mappedfile/empty ** GLib:ERROR:mappedfile.c:55:test_device: assertion failed: (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_INVAL) || g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT) || g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOMEM)) # GLib:ERROR:mappedfile.c:55:test_device: assertion failed: (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_INVAL) || g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT) || g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOMEM)) ../../tap-test: line 5: 1315 Aborted $1 -k --tap I hope this information helps. I'll also run the following commands and see if the results are any different and update the bug accordingly. ./configure make make check
After running the following commands: ./configure make make check It resulted in the same exact test failure and error message. FYI
I'm sorry -- my mistake. Can you try with the _NOENT changed to _NODEV?
Created attachment 270035 [details] [review] mappedfile test: permit ENODEV on /dev/null mmap() on /dev/null returns ENODEV on old Linux versions and also on Hurd, so accept that in the testcase.
Attachment 270035 [details] pushed as 4af9b8e - mappedfile test: permit ENODEV on /dev/null