mslookup_client_mdns_test fails on my machine
Since the mslookup-related code was merged to OsmoHLR, I noticed that mslookup_client_mdns_test fails on my machine, while daily build jobs in Jenkins do pass just fine. I am using the recent versions, in particular:
- libosmocore 89c04288252f1a50bbba5680c2f884a95f0eba2d
- libosmo-abis ef1f327c967d5ee974e039d0da62c79e9ab9184b
- osmo-hlr 5e5ce4aef29a9cb6dcc5f811899c92b61a9995d6
Here is the test output:
Total time passed: 0.000000 s -- test_server_client -- server_init client_init client_query sending mDNS query: gsup.hlr.123456789012345.imsi Assert failed osmo_select_main_ctx(1) == 1 mslookup_client_mdns_test.c:180 backtrace() returned 7 addresses /usr/local/lib/libosmocore.so.12(+0x1a13f) [0x7f726537f13f] /usr/local/lib/libosmocore.so.12(osmo_panic+0xce) [0x7f726537f0de] tests/mslookup/mslookup_client_mdns_test(+0x5c2c) [0x557731de1c2c] tests/mslookup/mslookup_client_mdns_test(+0x688a) [0x557731de288a] /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f726481c153] tests/mslookup/mslookup_client_mdns_test(+0x44be) [0x557731de04be] Aborted (core dumped)
Adding an additional fprintf() before doing OSMO_ASSERT() gives me:
sending mDNS query: gsup.hlr.123456789012345.imsi Wait, rc=0?!? Assert failed rc == 1 mslookup_client_mdns_test.c:182
Thanks for opening the issue! I'm not sure why it fails for you (maybe there is a delay before the multicast packet arrives?) and I don't see how I could debug this.
neels wrote that it is a good idea not to use network in regression tests. But instead of rewriting the test to use a shim and spend more time on it (while we're trying to finish up the D-GSM related patches), I would disable the test by default, and add a configure option to enable it. Then I'd put that option in jenkins.sh, so it's at least running at jenkins.