[master] c7eaf5d2a varnishtest: New coverage feature check

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Aug 25 10:21:06 UTC 2021


commit c7eaf5d2a0a0a08e31a8a2547dfe00ff20f52e99
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Aug 24 18:00:42 2021 +0200

    varnishtest: New coverage feature check

diff --git a/bin/varnishtest/tests/v00004.vtc b/bin/varnishtest/tests/v00004.vtc
index 805543c55..3e8bca71c 100644
--- a/bin/varnishtest/tests/v00004.vtc
+++ b/bin/varnishtest/tests/v00004.vtc
@@ -2,9 +2,7 @@ varnishtest "test if our default paramers make sense ..."
 
 feature 64bit
 feature !sanitizer
-
-# Skip this test in GCOV mode, 68xx bytes extra per level makes it fail
-feature cmd {test -z "$GCOVPROG"}
+feature !coverage
 
 # ... for our definition of a standard use case:
 # - 2019 header madness
diff --git a/bin/varnishtest/vtc_misc.c b/bin/varnishtest/vtc_misc.c
index eaf9a99a7..f19714c6b 100644
--- a/bin/varnishtest/vtc_misc.c
+++ b/bin/varnishtest/vtc_misc.c
@@ -438,6 +438,8 @@ addr_no_randomize_works(void)
  *        recognized as a macro.
  * persistent_storage
  *        Varnish was built with the deprecated persistent storage.
+ * coverage
+ *        Varnish was built with code coverage enabled.
  * sanitizer
  *        Varnish was built with a sanitizer.
  *
@@ -449,6 +451,12 @@ addr_no_randomize_works(void)
  * run a test with strings of the form "${...}".
  */
 
+#if ENABLE_COVERAGE
+static const unsigned coverage = 1;
+#else
+static const unsigned coverage = 0;
+#endif
+
 #if WITH_PERSISTENT_STORAGE
 static const unsigned with_persistent_storage = 1;
 #else
@@ -513,6 +521,7 @@ cmd_feature(CMD_ARGS)
 		FEATURE("user_vcache", getpwnam("vcache") != NULL);
 		FEATURE("group_varnish", getgrnam("varnish") != NULL);
 		FEATURE("persistent_storage", with_persistent_storage);
+		FEATURE("coverage", coverage);
 		FEATURE("sanitizer", sanitizer);
 		FEATURE("SO_RCVTIMEO_WORKS", so_rcvtimeo_works);
 


More information about the varnish-commit mailing list