]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
resolv: Serialize processing in resolv/tst-resolv-txnid-collision
authorFlorian Weimer <fweimer@redhat.com>
Thu, 15 Oct 2020 10:33:13 +0000 (12:33 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 15 Oct 2020 10:33:13 +0000 (12:33 +0200)
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)").

resolv/tst-resolv-txnid-collision.c

index 611d37362f3e5e89b92766f0790459340cc071b3..189b76f1268f4e4d4345565bcd4f054052fa0934 100644 (file)
@@ -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)