After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 768550 - Test failure: check_expected_events
Test failure: check_expected_events
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gio
2.52.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-07-08 07:50 UTC by Daniel Macks
Modified: 2018-05-24 18:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
events-lists comparison (3.87 KB, text/html)
2017-06-08 13:41 UTC, Daniel Macks
Details

Description Daniel Macks 2016-07-08 07:50:20 UTC
Building glib-2.48.1 on OS X 10.11 with xcode-7.3.1, I get a self-test failure in gio/tests:

ERROR: testfilemonitor - too few tests run (expected 5, got 0)
ERROR: testfilemonitor - exited with status 134 (terminated by signal 6?)

From gio/tests/testfilemonitor.log:

# random seed: R02Sae98c35b286e4a3c94d1fd2e88081d9e
1..5
**
GLib-GIO:ERROR:testfilemonitor.c:93:check_expected_events: assertion failed (n_expected == g_list_length (recorded)): (9 == 10)
# Start of monitor tests
../../tap-test: line 5: 36132 Abort trap: 6           $1 -k --tap
# GLib-GIO:ERROR:testfilemonitor.c:93:check_expected_events: assertion failed (n_expected == g_list_length (recorded)): (9 == 10)
ERROR: testfilemonitor - too few tests run (expected 5, got 0)
ERROR: testfilemonitor - exited with status 134 (terminated by signal 6?)

I know OS X has some filesystem details and interfaces that are different than linux. I'm configuring with --disable-fam, and using older glib I often see console diagnostics about various volume- or directory-monitoring being unavailable.
Comment 1 Daniel Macks 2017-05-22 07:37:16 UTC
Still as of 2.52.2, and enabling fam (installing the "gamin" package, and verifying that glib's fam detection succeeds) does not resolve it. But running the test manually does give a bit better diagnostic than the .log (sorry I forgot to include this earlier!):

/monitor/atomic-replace: **
GLib-GIO:ERROR:testfilemonitor.c:93:check_expected_events: assertion failed (n_expected == g_list_length (recorded)): (9 == 10)
Abort
Comment 2 Philip Withnall 2017-05-22 08:25:23 UTC
Can you use gdb to print out the recorded events so we can compare them to the atomic_replace_output array?
Comment 3 Daniel Macks 2017-06-04 07:44:26 UTC
I'm not very proficient with gdb and I know little about this area of libgio. Could you give me some more specific commands or at least what variables or information the "recorded events" refers to?
Comment 4 Philip Withnall 2017-06-05 15:13:06 UTC
(In reply to Daniel Macks from comment #3)
> I'm not very proficient with gdb and I know little about this area of
> libgio. Could you give me some more specific commands or at least what
> variables or information the "recorded events" refers to?

The gdb commands should be something like:

frame 4  # to select the check_expected_events() frame in the backtrace
print n_expected
print expected[0]
print *((RecordedEvent *) recorded->data)
print expected[1]
print *((RecordedEvent *) recorded->next->data)
print expected[2]
print *((RecordedEvent *) recorded->next->next->data)

etc. until you’ve printed out all elements of both lists (which will mean printing out the trailing element of one of the lists separately). Thanks.
Comment 5 Daniel Macks 2017-06-08 13:41:20 UTC
Created attachment 353382 [details]
events-lists comparison
Comment 6 Daniel Macks 2017-08-12 07:30:13 UTC
Is there any other information you need or things I should try? The two parallel structs get out of sync so badly and there are so many things happening in this test, I don't know where to begin.

Brendan, a fink developer, mentioned:

<brendan> glib2 testfilemonitor error seems to have to do with the monitor not converting delete+add to rename...

<brendan> I'm not sure, I think it may be mainly the move versus delete/create and the other bits fall out of that
Comment 7 GNOME Infrastructure Team 2018-05-24 18:59:48 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/1181.