[master] 2e8472921 PRIV_TASK vtc: Use the new alternation (?) feature

Nils Goroll nils.goroll at uplex.de
Tue Jan 12 22:11:13 UTC 2021


commit 2e847292100e81acb35c83ddb2cc7ba7a93ebe5c
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Jan 12 22:16:48 2021 +0100

    PRIV_TASK vtc: Use the new alternation (?) feature
    
    ... where log order is undeterministic (I mean, not really, but from the
    perspective of our tests it can not be determined).

diff --git a/bin/varnishtest/tests/r02451.vtc b/bin/varnishtest/tests/r02451.vtc
index 39cf67aa2..80e197939 100644
--- a/bin/varnishtest/tests/r02451.vtc
+++ b/bin/varnishtest/tests/r02451.vtc
@@ -53,9 +53,9 @@ 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}
+	expect ? *    Debug             {^priv_task_free}
+	expect ? *    Debug             {^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..6d5b6345b 100644
--- a/bin/varnishtest/tests/v00041.vtc
+++ b/bin/varnishtest/tests/v00041.vtc
@@ -108,7 +108,7 @@ varnish v1 -arg "-p debug=+vclrel -p workspace_client=1m" -vcl+backend {
 
 } -start
 
-logexpect l0 -v v1 -g raw -d 1 -q "vxid == 0 and not ExpKill" {
+logexpect l0 -v v1 -g raw -d 1 -m -q "vxid == 0 and not ExpKill" {
 	expect 0 0    CLI		{^Rd vcl.load}
 	expect 0 =    Debug		{^test_priv_task.*new.$}
 	expect 0 =    Debug		{^test_priv_task.*update.$}
@@ -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 ? =    Debug		{^priv_task_free}
+	expect ? =    Debug		{^obj_priv_task_fini.*"initX"}
+	expect ? =    Debug		{^obj_priv_task_fini.*"initY"}
 	expect 0 =    Debug		{^vcl1: VCL_EVENT_WARM}
 
 	# 1001/1002
@@ -132,11 +132,13 @@ logexpect l0 -v v1 -g raw -d 1 -q "vxid == 0 and not ExpKill" {
 	expect 0 =    Debug		{^test_priv_task.*new.$}
 	expect 0 =    Debug		{^test_priv_task.*update.$}
 	expect 0 =    Debug		{^test_priv_task.*exists.$}
-	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"}
+	# client task can race with backend fini, so all of these are
+	# in any order (? = alternatives)
+	expect ? =    Debug		{^priv_task_free}
+	expect ? =    Debug		{^obj_priv_task_fini.*"r1002"}
+	expect ? =    Debug		{^test_priv_task.*exists}
+	expect ? =    Debug		{^priv_task_free}
+	expect ? =    Debug		{^obj_priv_task_fini.*"d1001"}
 
 	# ...
 	# 1006 pipe


More information about the varnish-commit mailing list