Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Commit b155963

Browse files
committed
Move build-time feature checks / macros to new vtest extension "builtwith"
As we no longer compile vtest with every build, we can no longer use code in vtest core to inform tests about compile time settings. We move these to a new vtest extension which we do build. Ref #4398
1 parent d405442 commit b155963

25 files changed

Lines changed: 251 additions & 27 deletions

bin/varnishtest/Makefile.am

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,14 @@ else
127127
################################################################################
128128
## BEGIN vtc_varnish ext
129129

130-
lib_LTLIBRARIES = libvtc_varnish.la libdummy.la
130+
lib_LTLIBRARIES = libvtc_varnish.la libvtc_builtwith.la libdummy.la
131131

132132
# XXX TODO
133133
# - for actual move, the sources need to be relocated from VTest2 back to here
134134
# - for actual move, remove -DVTEST_WITH_...
135-
# - solve WITH_PERSISTENT_STORAGE
135+
# - remove feature tests now in builtwith from Vtest2 core
136+
# - remove pkg_version pkg_branch from Vtest2 core
137+
# - add libvtc_builtwith to Vtest2 as an example
136138
libvtc_varnish_la_SOURCES = \
137139
vtest2/src/vtc_varnish.c \
138140
vtest2/src/vtc_vsm.c \
@@ -151,6 +153,10 @@ libvtc_varnish_la_LIBADD = \
151153
$(top_builddir)/lib/libvgz/libvgz.la \
152154
${PTHREAD_LIBS} ${NET_LIBS} ${LIBM}
153155

156+
libvtc_builtwith_la_SOURCES = vtc_ext_builtwith.c
157+
158+
libvtc_builtwith_la_CFLAGS = @VTEST_CFLAGS@
159+
154160
libdummy_la_SOURCES = libdummy.c
155161

156162
bin_PROGRAMS = varnishtest

bin/varnishtest/tests/b00068.vtc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
varnishtest "Check timeout_linger"
22

3-
feature !workspace_emulator
3+
builtwith !workspace_emulator
44

55
# XXX this test exploits the fact that the struct waited is
66
# left near the free pointer of the session ws when a session

bin/varnishtest/tests/c00057.vtc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ varnishtest "test sigsegv handler"
22

33
# Under ASAN, the stack layout is different and STACK OVERFLOW is
44
# never printed.
5-
feature !asan
5+
builtwith !asan
66

77
server s1 {
88
rxreq

bin/varnishtest/tests/e00029.vtc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
varnishtest "ESI max_esi_depth"
22

3-
feature !sanitizer
3+
builtwith !sanitizer
44

55
# test that the default stack size is sufficient for hitting
66
# max_esi_depth

bin/varnishtest/tests/o00006.vtc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
varnishtest "SES_Reserve_proto_priv() overflow"
22

3-
feature 64bit ipv4
3+
builtwith 64bit
4+
feature ipv4
45

56
server s1 {
67
rxreq

bin/varnishtest/tests/p00000.vtc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
varnishtest "Test Basic persistence"
22

3-
feature persistent_storage
3+
builtwith persistent_storage
44

55
process p1 -dump {
66
varnishd -spersistent -b ${localhost} -a :0 -d 2>&1

bin/varnishtest/tests/p00002.vtc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
varnishtest "Ban a persistent object"
22

3-
feature persistent_storage
3+
builtwith persistent_storage
44

55
shell "rm -f ${tmpdir}/_.per[12]"
66

bin/varnishtest/tests/p00003.vtc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
varnishtest "Ban a persistent object"
22

3-
feature persistent_storage
3+
builtwith persistent_storage
44

55
shell "rm -f ${tmpdir}/_.per"
66

bin/varnishtest/tests/p00004.vtc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
varnishtest "Check object references"
22

3-
feature persistent_storage
3+
builtwith persistent_storage
44

55
shell "rm -f ${tmpdir}/_.per"
66

bin/varnishtest/tests/p00005.vtc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
varnishtest "Check expiry of non-instantiated object"
22

3-
feature persistent_storage
3+
builtwith persistent_storage
44

55
shell "rm -f ${tmpdir}/_.per"
66

0 commit comments

Comments
 (0)