aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2022-09-08 12:55:42 +0200
committerDmitry Vyukov <dvyukov@google.com>2022-11-01 10:23:09 -0700
commit08977f5d5e344fa0ac0b80af0b72fc3f1468d6a5 (patch)
tree073d5136049228b4a279d9bca98d678f1a7afe12 /pkg/csource
parent75eae5a7ef67781b73f2b9038416542c7ea0612c (diff)
executor: add setup_ext_test extension point
The extension point allows to setup the test process in a custom way without overwriting any of the existing files.
Diffstat (limited to 'pkg/csource')
-rw-r--r--pkg/csource/csource_test.go1
-rw-r--r--pkg/csource/generated.go3
2 files changed, 4 insertions, 0 deletions
diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go
index 491b84b03..bfeb8f6a7 100644
--- a/pkg/csource/csource_test.go
+++ b/pkg/csource/csource_test.go
@@ -151,6 +151,7 @@ func TestExecutorMacros(t *testing.T) {
expected["SYZ_HAVE_SETUP_LOOP"] = true
expected["SYZ_HAVE_RESET_LOOP"] = true
expected["SYZ_HAVE_SETUP_TEST"] = true
+ expected["SYZ_TEST_COMMON_EXT_EXAMPLE"] = true
macros := regexp.MustCompile("SYZ_[A-Za-z0-9_]+").FindAllString(commonHeader, -1)
for _, macro := range macros {
if strings.HasPrefix(macro, "SYZ_HAVE_") {
diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go
index 711e74801..6713c04c9 100644
--- a/pkg/csource/generated.go
+++ b/pkg/csource/generated.go
@@ -11370,6 +11370,9 @@ static void loop(void)
#if SYZ_HAVE_SETUP_TEST
setup_test();
#endif
+#if SYZ_HAVE_SETUP_EXT_TEST
+ setup_ext_test();
+#endif
#if GOOS_akaros
#if SYZ_EXECUTOR
dup2(child_pipe[0], kInPipeFd);