From: Florian Weimer Date: Thu, 15 Oct 2020 10:33:13 +0000 (+0200) Subject: resolv: Serialize processing in resolv/tst-resolv-txnid-collision X-Git-Tag: glibc-2.33~382 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b8b53b338f6da91e86d115a39da860cefac736ad;p=thirdparty%2Fglibc.git resolv: Serialize processing in resolv/tst-resolv-txnid-collision When switching name servers, response processing by two server threads clobbers the global test state. (There is still some risk that this test is negatively impact by packet drops and packet reordering, but this applies to many of the resolver tests and is difficult to avoid.) Fixes commit f1f00c072138af90ae6da180f260111f09afe7a3 ("resolv: Handle transaction ID collisions in parallel queries (bug 26600)"). --- diff --git a/resolv/tst-resolv-txnid-collision.c b/resolv/tst-resolv-txnid-collision.c index 611d37362f3..189b76f1268 100644 --- a/resolv/tst-resolv-txnid-collision.c +++ b/resolv/tst-resolv-txnid-collision.c @@ -309,6 +309,11 @@ do_test (void) ((struct resolv_redirect_config) { .response_callback = response, + + /* The response callback use global state (the previous_* + variables), and query processing must therefore be + serialized. */ + .single_thread_udp = true, }); for (int rcode = 0; rcode <= 5; ++rcode)