platform/tests: fix assertion failure in NMTstpAcdDefender

Seems we can get a DOWN event during unit tests. I don't really
understand why, but let's ignore it.

  [...]
  #4  0x000055e365777786 in _l3_acd_nacd_event (fd=<optimized out>, condition=<optimized out>, user_data=0x55e367566270) at src/core/platform/tests/test-common.c:2703
  #5  0x00007f4399c224cf in g_main_dispatch (context=0x55e36755fce0) at ../glib/gmain.c:3337
  #6  g_main_context_dispatch (context=0x55e36755fce0) at ../glib/gmain.c:4055
  #7  0x00007f4399c764f8 in g_main_context_iterate.constprop.0 (context=context@entry=0x55e36755fce0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
      at ../glib/gmain.c:4131
  #8  0x00007f4399c1fc03 in g_main_context_iteration (context=0x55e36755fce0, context@entry=0x0, may_block=may_block@entry=1) at ../glib/gmain.c:4196
  #9  0x000055e365770719 in test_l3_ipv6ll (test_data=<optimized out>) at src/core/tests/test-l3cfg.c:1024
This commit is contained in:
Thomas Haller 2021-09-25 10:06:16 +02:00
parent a446e490f9
commit d68fa91199
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -2696,9 +2696,13 @@ _l3_acd_nacd_event(int fd, GIOCondition condition, gpointer user_data)
NM_HASH_OBFUSCATE_PTR(defender),
NM_ETHER_ADDR_FORMAT_VAL((const NMEtherAddr *) event->defended.sender));
break;
case N_ACD_EVENT_DOWN:
/* Not sure why this sometimes happens. But this is only the test stub, ignore it. */
_LOGT("acd-defender[" NM_HASH_OBFUSCATE_PTR_FMT "]: link down event received",
NM_HASH_OBFUSCATE_PTR(defender));
break;
case N_ACD_EVENT_USED:
case N_ACD_EVENT_CONFLICT:
case N_ACD_EVENT_DOWN:
default:
g_assert_not_reached();
break;