tf_fuzz: do not check sst read value when data_size=0
Do not run check code for sst read when the requested data size is 0.
Fixes demo/10.test. This demo failed as it does a 0 byte read followed
by a memcmp check. Memcmp with a buffer length of 0 returns 0; however,
the test wanted to check that the strings were different (!=0).
The length to read is set to 0 only when the fuzzer expects the asset to
not exist or be unreadable, so this essentially acts as a way for the
simulation step to decide to disable the check.
Change-Id: Iba21e7377fc3b84b2c0a67f527101ec789835d5e
Signed-off-by: Nik Dewally <Nik.Dewally@arm.com>
diff --git a/tf_fuzz/tfz-cpp/utility/randomization.cpp b/tf_fuzz/tfz-cpp/utility/randomization.cpp
index 65f4a01..c8cdd38 100644
--- a/tf_fuzz/tfz-cpp/utility/randomization.cpp
+++ b/tf_fuzz/tfz-cpp/utility/randomization.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2024, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -101,4 +101,3 @@
}
return ""; /* placate compiler */
}
-