From 08977f5d5e344fa0ac0b80af0b72fc3f1468d6a5 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 8 Sep 2022 12:55:42 +0200 Subject: 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. --- pkg/csource/csource_test.go | 1 + pkg/csource/generated.go | 3 +++ 2 files changed, 4 insertions(+) (limited to 'pkg/csource') 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); -- cgit mrf-deployment