446cf2
commit b8b53b338f6da91e86d115a39da860cefac736ad
446cf2
Author: Florian Weimer <fweimer@redhat.com>
446cf2
Date:   Thu Oct 15 12:33:13 2020 +0200
446cf2
446cf2
    resolv: Serialize processing in resolv/tst-resolv-txnid-collision
446cf2
    
446cf2
    When switching name servers, response processing by two server
446cf2
    threads clobbers the global test state.  (There is still some
446cf2
    risk that this test is negatively impact by packet drops and
446cf2
    packet reordering, but this applies to many of the resolver tests
446cf2
    and is difficult to avoid.)
446cf2
    
446cf2
    Fixes commit f1f00c072138af90ae6da180f260111f09afe7a3 ("resolv:
446cf2
    Handle transaction ID collisions in parallel queries (bug 26600)").
446cf2
446cf2
diff --git a/resolv/tst-resolv-txnid-collision.c b/resolv/tst-resolv-txnid-collision.c
446cf2
index 611d37362f3e5e89..189b76f1268f4e4d 100644
446cf2
--- a/resolv/tst-resolv-txnid-collision.c
446cf2
+++ b/resolv/tst-resolv-txnid-collision.c
446cf2
@@ -309,6 +309,11 @@ do_test (void)
446cf2
     ((struct resolv_redirect_config)
446cf2
      {
446cf2
        .response_callback = response,
446cf2
+
446cf2
+       /* The response callback use global state (the previous_*
446cf2
+          variables), and query processing must therefore be
446cf2
+          serialized.  */
446cf2
+       .single_thread_udp = true,
446cf2
      });
446cf2
 
446cf2
   for (int rcode = 0; rcode <= 5; ++rcode)