aboutsummaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-10-15 12:33:13 +0200
committerFlorian Weimer <fweimer@redhat.com>2020-10-15 12:33:13 +0200
commitb8b53b338f6da91e86d115a39da860cefac736ad (patch)
treed71c9cabbb74ebb032b221ce1937dd70e2726d26 /resolv
parentd3a5ae6ad16ba488dec7d15c6554585d9a405336 (diff)
downloadglibc-b8b53b338f6da91e86d115a39da860cefac736ad.zip
glibc-b8b53b338f6da91e86d115a39da860cefac736ad.tar.gz
glibc-b8b53b338f6da91e86d115a39da860cefac736ad.tar.bz2
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)").
Diffstat (limited to 'resolv')
-rw-r--r--resolv/tst-resolv-txnid-collision.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/resolv/tst-resolv-txnid-collision.c b/resolv/tst-resolv-txnid-collision.c
index 611d373..189b76f 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)