test(fuzz): Fix single feature testing
This change fixes an issue where a user provides a new feature
that can be fuzzed independently of the current setup of fuzzing.
Currently compile fails will cause issues if single feature fuzzing
is desired and the automated flow will disable sets that are not in
the SMC description file. There are some small changes to the source
files to enable this behavior for both SDEI and Vendor. There is also
a change to the automated scripting.
Change-Id: Ic768e9f1b285225f12f23c1e36acb668088ad129
Signed-off-by: Mark Dykes <mark.dykes@arm.com>
Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
diff --git a/smc_fuzz/src/runtestfunction_helpers.c b/smc_fuzz/src/runtestfunction_helpers.c
index 411949c..fbee707 100644
--- a/smc_fuzz/src/runtestfunction_helpers.c
+++ b/smc_fuzz/src/runtestfunction_helpers.c
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+#include <arg_struct_def.h>
#include <sdei_fuzz_helper.h>
#include "smcmalloc.h"
#include <tsp_fuzz_helper.h>
@@ -19,10 +20,13 @@
{
bool inrange = (cntid >= SMC_FUZZ_CALL_START) && (cntid < SMC_FUZZ_CALL_END);
inrange = inrange && (funcid != EXCLUDE_FUNCID);
-
+#ifdef SDEI_INCLUDE
run_sdei_fuzz(funcid, mmod, inrange, cntid);
+#endif
run_tsp_fuzz(funcid);
+#ifdef VEN_INCLUDE
run_ven_el3_fuzz(funcid, mmod);
+#endif
cntid++;
}
diff --git a/smc_fuzz/src/sdei_fuzz_helper.c b/smc_fuzz/src/sdei_fuzz_helper.c
index 5a1d866..7387161 100644
--- a/smc_fuzz/src/sdei_fuzz_helper.c
+++ b/smc_fuzz/src/sdei_fuzz_helper.c
@@ -13,6 +13,8 @@
#include <fuzz_names.h>
#include <sdei_fuzz_helper.h>
+#ifdef SDEI_INCLUDE
+
int stbev = 0;
#define MIN_PPI_ID U(16)
@@ -785,3 +787,5 @@
}
}
}
+
+#endif
diff --git a/smc_fuzz/src/vendor_fuzz_helper.c b/smc_fuzz/src/vendor_fuzz_helper.c
index 2de10b4..1e1cb48 100644
--- a/smc_fuzz/src/vendor_fuzz_helper.c
+++ b/smc_fuzz/src/vendor_fuzz_helper.c
@@ -14,6 +14,8 @@
#include <smccc.h>
#include <uuid_utils.h>
+#ifdef VEN_INCLUDE
+
/*
* Vendor-Specific EL3 UUID as returned by the implementation in the Trusted
* Firmware.
@@ -109,3 +111,5 @@
}
}
}
+
+#endif