[PATCH v3] resolv: Add tests for getaddrinfo returning EAI_AGAIN [BZ #16849]
Florian Weimer
fweimer@redhat.com
Tue Sep 23 14:49:38 GMT 2025
* Sergey Kolosov:
> + struct resolv_test *aux = resolv_test_start
> + ((struct resolv_redirect_config)
> + {
> + .response_callback = response_drop,
> + });
> + /* Reduce default timeout to make the test run faster. */
> + if (res_init () == -1)
> + FAIL_EXIT1 ("res_init failed");
> + _res.retrans = 1;
> + _res.retry = 1;
Calling res_init resets the setup done by resolv_test_start. The call
has already happened internally as part of resolv_test_start. I think
you should just remove it.
Please also add flags that check that the response callbacks have been
called at least once (the variables probably need to be static volatile).
Thanks,
Florian
More information about the Libc-alpha
mailing list