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