[master] b02c78438 PRIV_TASK vtc: tolerate fini order
Nils Goroll
nils.goroll at uplex.de
Tue Jan 12 17:09:07 UTC 2021
commit b02c78438c4e36d967a866466c9ce0cccb32dc0f
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Tue Jan 12 18:07:09 2021 +0100
PRIV_TASK vtc: tolerate fini order
this turned out to be harder than I thought: I had not considered the
fact that fini order of a red-black tree indexed by uintptrs depends on
the memory order.
Ref d89c8bf59b9da8263f1a767c68e4ee35d2569d11
diff --git a/bin/varnishtest/tests/r02451.vtc b/bin/varnishtest/tests/r02451.vtc
index 39cf67aa2..b25163a65 100644
--- a/bin/varnishtest/tests/r02451.vtc
+++ b/bin/varnishtest/tests/r02451.vtc
@@ -53,9 +53,10 @@ logexpect l1 -v v1 -g raw -d 1 {
expect 0 * VCL_Log {^func something to remember}
expect 0 * Debug {^objx.priv_task.*"something to remember".$}
expect 0 * VCL_Log {^obj something to remember}
- expect 0 * Debug {^priv_task_free}
- # string stored in obj priv_task has already been freed
- expect 0 * Debug {^obj_priv_task_fini}
+ # string stored in obj priv_task can already been freed,
+ # depending on the order
+ expect 0 * Debug {^priv_task_free|^obj_priv_task_fini}
+ expect 0 * Debug {^priv_task_free|^obj_priv_task_fini}
expect 0 * Debug {^vcl1: VCL_EVENT_WARM}
} -start
diff --git a/bin/varnishtest/tests/v00041.vtc b/bin/varnishtest/tests/v00041.vtc
index 55415bd1d..f3febd423 100644
--- a/bin/varnishtest/tests/v00041.vtc
+++ b/bin/varnishtest/tests/v00041.vtc
@@ -120,9 +120,9 @@ logexpect l0 -v v1 -g raw -d 1 -q "vxid == 0 and not ExpKill" {
expect 0 = VCL_Log {^objc initX}
expect 0 = Debug {^objb.priv_task.. = .*"initY"}
expect 0 = VCL_Log {^objb initY}
- expect 0 = Debug {^priv_task_free}
- expect 0 = Debug {^obj_priv_task_fini.*"initX"}
- expect 0 = Debug {^obj_priv_task_fini.*"initY"}
+ expect 0 = Debug {^priv_task_free|^obj_priv_task_fini}
+ expect 0 = Debug {^priv_task_free|^obj_priv_task_fini}
+ expect 0 = Debug {^priv_task_free|^obj_priv_task_fini}
expect 0 = Debug {^vcl1: VCL_EVENT_WARM}
# 1001/1002
@@ -135,8 +135,8 @@ logexpect l0 -v v1 -g raw -d 1 -q "vxid == 0 and not ExpKill" {
expect 0 = Debug {^priv_task_free}
expect 0 = Debug {^obj_priv_task_fini.*"r1002"}
expect 0 = Debug {^test_priv_task.*exists}
- expect 0 = Debug {^priv_task_free}
- expect 0 = Debug {^obj_priv_task_fini.*"d1001"}
+ expect 0 = Debug {^priv_task_free|^obj_priv_task_fini.*"d1001"}
+ expect 0 = Debug {^priv_task_free|^obj_priv_task_fini.*"d1001"}
# ...
# 1006 pipe
More information about the varnish-commit
mailing list