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/calls/psa_call.cpp b/tf_fuzz/tfz-cpp/calls/psa_call.cpp
index 0e1680b..98c7ba2 100644
--- a/tf_fuzz/tfz-cpp/calls/psa_call.cpp
+++ b/tf_fuzz/tfz-cpp/calls/psa_call.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2024, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
@@ -399,5 +399,3 @@
 /**********************************************************************************
    End of methods of class security_call.
 **********************************************************************************/
-
-
diff --git a/tf_fuzz/tfz-cpp/calls/sst_call.cpp b/tf_fuzz/tfz-cpp/calls/sst_call.cpp
index ac71a8d..5007314 100644
--- a/tf_fuzz/tfz-cpp/calls/sst_call.cpp
+++ b/tf_fuzz/tfz-cpp/calls/sst_call.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
  *
@@ -332,7 +332,7 @@
 
 void sst_get_call::fill_in_command (void)
 {
-    string exp_var_name, act_var_name, act_data_length, hash_var_name,
+    string exp_var_name, act_var_name, length_var_name,act_data_length, hash_var_name,
     id_string, var_name_suffix;
 
 /* TODO:  Flesh-out/fix this (it was a good try/start, but not quite right):
@@ -399,11 +399,12 @@
     find_replace_all ("$act_data", act_var_name, call_code);
     find_replace_all ("$act_length", act_data_length, call_code);
     // Perform most of the same substitutions in the check_code:
-// TODO:  Make data checks contingent upon the PSA call itself passing?
+    // TODO:  Make data checks contingent upon the PSA call itself passing?
     find_replace_1st ("$offset", "0", check_code);
     find_replace_1st ("$exp_data", exp_var_name, check_code);
     find_replace_all ("$act_data", act_var_name, check_code);
-    find_replace_all ("$length", act_data_length, check_code);
+    find_replace_all ("$length", to_string(set_data.get().length()), check_code);
+    find_replace_all ("$act_length", act_data_length, check_code);
     if (print_data) {
         check_code.append (test_state->bplate->bplate_string[test_log]);
         find_replace_1st ("$message", act_var_name, check_code);
@@ -492,4 +493,3 @@
 /**********************************************************************************
    End of methods of class sst_remove_call.
 **********************************************************************************/
-
diff --git a/tf_fuzz/tfz-cpp/regression/000001_set_sst_uid_data_expect_pass/exp_test.c b/tf_fuzz/tfz-cpp/regression/000001_set_sst_uid_data_expect_pass/exp_test.c
index bc4cc05..a6e429a 100644
--- a/tf_fuzz/tfz-cpp/regression/000001_set_sst_uid_data_expect_pass/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000001_set_sst_uid_data_expect_pass/exp_test.c
@@ -33,7 +33,7 @@
         return;
     }
 
-    TEST_LOG("Test to create an SST asset");
+    TEST_LOG("Test to create an SST asset\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/regression/000002_set_sst_name_data_expect_nothing/exp_test.c b/tf_fuzz/tfz-cpp/regression/000002_set_sst_name_data_expect_nothing/exp_test.c
index f4377a1..c3cb327 100644
--- a/tf_fuzz/tfz-cpp/regression/000002_set_sst_name_data_expect_nothing/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000002_set_sst_name_data_expect_nothing/exp_test.c
@@ -33,7 +33,7 @@
         return;
     }
 
-    TEST_LOG("Test to give assets a human name");
+    TEST_LOG("Test to give assets a human name\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/regression/000003_set_sst_name_data/exp_test.c b/tf_fuzz/tfz-cpp/regression/000003_set_sst_name_data/exp_test.c
index f000d80..046787d 100644
--- a/tf_fuzz/tfz-cpp/regression/000003_set_sst_name_data/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000003_set_sst_name_data/exp_test.c
@@ -33,7 +33,7 @@
         return;
     }
 
-    TEST_LOG("Test to show that TF-Fuzz can \"infer\" \"results\"");
+    TEST_LOG("Test to show that TF-Fuzz can \"infer\" \"results\"\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/regression/000004_set_sst_name_rand_data/exp_test.c b/tf_fuzz/tfz-cpp/regression/000004_set_sst_name_rand_data/exp_test.c
index e2edc02..5bfd6c9 100644
--- a/tf_fuzz/tfz-cpp/regression/000004_set_sst_name_rand_data/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000004_set_sst_name_rand_data/exp_test.c
@@ -33,7 +33,7 @@
         return;
     }
 
-    TEST_LOG("Test to show how to randomize data");
+    TEST_LOG("Test to show how to randomize data\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/regression/000005_set_sst_rand_name_rand_data/exp_test.c b/tf_fuzz/tfz-cpp/regression/000005_set_sst_rand_name_rand_data/exp_test.c
index 9868812..d9de188 100644
--- a/tf_fuzz/tfz-cpp/regression/000005_set_sst_rand_name_rand_data/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000005_set_sst_rand_name_rand_data/exp_test.c
@@ -33,7 +33,7 @@
         return;
     }
 
-    TEST_LOG("Test to show how to randomize name and data");
+    TEST_LOG("Test to show how to randomize name and data\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/regression/000006_set_sst_multi_name_rand_data/exp_test.c b/tf_fuzz/tfz-cpp/regression/000006_set_sst_multi_name_rand_data/exp_test.c
index 0821cb6..430e642 100644
--- a/tf_fuzz/tfz-cpp/regression/000006_set_sst_multi_name_rand_data/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000006_set_sst_multi_name_rand_data/exp_test.c
@@ -41,7 +41,7 @@
         return;
     }
 
-    TEST_LOG("Test to show a nice party trick");
+    TEST_LOG("Test to show a nice party trick\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/regression/000007_set_sst_multi_uid_rand_data/exp_test.c b/tf_fuzz/tfz-cpp/regression/000007_set_sst_multi_uid_rand_data/exp_test.c
index 3516c14..df0f585 100644
--- a/tf_fuzz/tfz-cpp/regression/000007_set_sst_multi_uid_rand_data/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000007_set_sst_multi_uid_rand_data/exp_test.c
@@ -43,7 +43,7 @@
         return;
     }
 
-    TEST_LOG("Test same with UIDs");
+    TEST_LOG("Test same with UIDs\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/regression/000008_set_sst_name_rand_data_read_check_wrong/exp_test.c b/tf_fuzz/tfz-cpp/regression/000008_set_sst_name_rand_data_read_check_wrong/exp_test.c
index 0084b1f..3bd4fcc 100644
--- a/tf_fuzz/tfz-cpp/regression/000008_set_sst_name_rand_data_read_check_wrong/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000008_set_sst_name_rand_data_read_check_wrong/exp_test.c
@@ -36,7 +36,7 @@
         return;
     }
 
-    TEST_LOG("Test to create and show an asset");
+    TEST_LOG("Test to create and show an asset\n");
 
 
     /* PSA calls to test: */
@@ -54,8 +54,8 @@
         return;
     }
     /* Check that the data is correct */
-    if \(memcmp\(snortwaggle_act_data, snortwaggle_exp_data,
-                   snortwaggle_act_length\) == 0\) {
+
+    if \(\d+ > 0 && memcmp\(snortwaggle_act_data, snortwaggle_exp_data, snortwaggle_act_length\) == 0\) {
         TEST_FAIL("Read data should not be equal to result data");
         return;
     }
diff --git a/tf_fuzz/tfz-cpp/regression/000009_set_sst_name_rand_data_read_check_var_read_print/exp_test.c b/tf_fuzz/tfz-cpp/regression/000009_set_sst_name_rand_data_read_check_var_read_print/exp_test.c
index 610f051..8e71a93 100644
--- a/tf_fuzz/tfz-cpp/regression/000009_set_sst_name_rand_data_read_check_var_read_print/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000009_set_sst_name_rand_data_read_check_var_read_print/exp_test.c
@@ -37,7 +37,7 @@
         return;
     }
 
-    TEST_LOG("Test to check against a variable or dump into the log");
+    TEST_LOG("Test to check against a variable or dump into the log\n");
 
 
     /* PSA calls to test: */
@@ -55,8 +55,8 @@
         return;
     }
     /* Check that the data is correct */
-    if (memcmp(greebledorf_act_data, a_variable,
-                   greebledorf_act_length) != 0) {
+
+    if \(\d+ > 0 && memcmp\(greebledorf_act_data, a_variable, greebledorf_act_length\) != 0\) {
         TEST_FAIL("Read data should be equal to result data");
         return;
     }
diff --git a/tf_fuzz/tfz-cpp/regression/000010_read_nonexistent_sst_check_string/exp_test.c b/tf_fuzz/tfz-cpp/regression/000010_read_nonexistent_sst_check_string/exp_test.c
index 0cd77b8..1eedaf5 100644
--- a/tf_fuzz/tfz-cpp/regression/000010_read_nonexistent_sst_check_string/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000010_read_nonexistent_sst_check_string/exp_test.c
@@ -34,7 +34,7 @@
         return;
     }
 
-    TEST_LOG("Test to show what happens when you 'read' a non-existent asset");
+    TEST_LOG("Test to show what happens when you 'read' a non-existent asset\n");
 
 
     /* PSA calls to test: */
@@ -45,8 +45,8 @@
         return;
     }
     /* Check that the data is correct */
-    if \(memcmp\(napoleon_act_data, napoleon_exp_data,
-                   napoleon_act_length\) == 0\) {
+
+    if \(\d+ > 0 && memcmp\(napoleon_act_data, napoleon_exp_data, napoleon_act_length\) == 0\) {
         TEST_FAIL("Read data should not be equal to result data");
         return;
     }
diff --git a/tf_fuzz/tfz-cpp/regression/000011_read_nonexistent_sst_check_string_expect_pass/exp_test.c b/tf_fuzz/tfz-cpp/regression/000011_read_nonexistent_sst_check_string_expect_pass/exp_test.c
index 2d464b0..19862a3 100644
--- a/tf_fuzz/tfz-cpp/regression/000011_read_nonexistent_sst_check_string_expect_pass/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000011_read_nonexistent_sst_check_string_expect_pass/exp_test.c
@@ -34,7 +34,7 @@
         return;
     }
 
-    TEST_LOG("Test to illustrate that you can override TF-Fuzz's expected result");
+    TEST_LOG("Test to illustrate that you can override TF-Fuzz's expected result\n");
 
 
     /* PSA calls to test: */
@@ -45,8 +45,8 @@
         return;
     }
     /* Check that the data is correct */
-    if \(memcmp\(napoleon_act_data, napoleon_exp_data,
-                   napoleon_act_length\) != 0\) \{
+
+    if \(\d+ > 0 && memcmp\(napoleon_act_data, napoleon_exp_data, napoleon_act_length\) != 0\) \{
         TEST_FAIL("Read data should be equal to result data");
         return;
     }
diff --git a/tf_fuzz/tfz-cpp/regression/000012_read_nonexistent_sst_check_string_expect_other/exp_test.c b/tf_fuzz/tfz-cpp/regression/000012_read_nonexistent_sst_check_string_expect_other/exp_test.c
index 93e16b5..6b4980d 100644
--- a/tf_fuzz/tfz-cpp/regression/000012_read_nonexistent_sst_check_string_expect_other/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000012_read_nonexistent_sst_check_string_expect_other/exp_test.c
@@ -34,7 +34,7 @@
         return;
     }
 
-    TEST_LOG("Test to more-specifically override TF-Fuzz's expected result");
+    TEST_LOG("Test to more-specifically override TF-Fuzz's expected result\n");
 
 
     /* PSA calls to test: */
@@ -45,8 +45,8 @@
         return;
     }
     /* Check that the data is correct */
-    if \(memcmp\(napoleon_act_data, napoleon_exp_data,
-                   napoleon_act_length\) == 0\) \{
+
+    if \(\d+ > 0 && memcmp\(napoleon_act_data, napoleon_exp_data, napoleon_act_length\) == 0\) \{
         TEST_FAIL("Read data should not be equal to result data");
         return;
     }
diff --git a/tf_fuzz/tfz-cpp/regression/000013_set_sst_name_rand_data_remove_twice/exp_test.c b/tf_fuzz/tfz-cpp/regression/000013_set_sst_name_rand_data_remove_twice/exp_test.c
index 57810a8..1735dae 100644
--- a/tf_fuzz/tfz-cpp/regression/000013_set_sst_name_rand_data_remove_twice/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000013_set_sst_name_rand_data_remove_twice/exp_test.c
@@ -33,7 +33,7 @@
         return;
     }
 
-    TEST_LOG("Test to illustrate deleting assets");
+    TEST_LOG("Test to illustrate deleting assets\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/regression/000014_set_sst_name_rand_data_remove_other/exp_test.c b/tf_fuzz/tfz-cpp/regression/000014_set_sst_name_rand_data_remove_other/exp_test.c
index 5e93196..e585026 100644
--- a/tf_fuzz/tfz-cpp/regression/000014_set_sst_name_rand_data_remove_other/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000014_set_sst_name_rand_data_remove_other/exp_test.c
@@ -33,7 +33,7 @@
         return;
     }
 
-    TEST_LOG("Test to remove something that doesn't exist");
+    TEST_LOG("Test to remove something that doesn't exist\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/regression/000015_set_sst_name_only/exp_test.c b/tf_fuzz/tfz-cpp/regression/000015_set_sst_name_only/exp_test.c
index 082816a..4366331 100644
--- a/tf_fuzz/tfz-cpp/regression/000015_set_sst_name_only/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000015_set_sst_name_only/exp_test.c
@@ -35,7 +35,7 @@
         return;
     }
 
-    TEST_LOG("Test to show that if you don't have say anything about data to randomize it");
+    TEST_LOG("Test to show that if you don't have say anything about data to randomize it\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/regression/000016_set_sst_single_asset_set_multiple_times/exp_test.c b/tf_fuzz/tfz-cpp/regression/000016_set_sst_single_asset_set_multiple_times/exp_test.c
index 709c28e..763d670 100644
--- a/tf_fuzz/tfz-cpp/regression/000016_set_sst_single_asset_set_multiple_times/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000016_set_sst_single_asset_set_multiple_times/exp_test.c
@@ -41,7 +41,7 @@
         return;
     }
 
-    TEST_LOG("Test to assign a sequence of values to a single asset");
+    TEST_LOG("Test to assign a sequence of values to a single asset\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/regression/000017_read_sst_check_single_asset_multiple_times/exp_test.c b/tf_fuzz/tfz-cpp/regression/000017_read_sst_check_single_asset_multiple_times/exp_test.c
index 609d8e9..51977c4 100644
--- a/tf_fuzz/tfz-cpp/regression/000017_read_sst_check_single_asset_multiple_times/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000017_read_sst_check_single_asset_multiple_times/exp_test.c
@@ -38,7 +38,7 @@
         return;
     }
 
-    TEST_LOG("Test to read the value of a single asset multiple times");
+    TEST_LOG("Test to read the value of a single asset multiple times\n");
 
 
     /* PSA calls to test: */
@@ -56,8 +56,8 @@
         return;
     }
     /* Check that the data is correct */
-    if \(memcmp\(just_checking_act_data, just_checking_exp_data,
-                   just_checking_act_length\) == 0\) {
+
+    if \(\d+ > 0 && memcmp\(just_checking_act_data, just_checking_exp_data, just_checking_act_length\) == 0\) {
         TEST_FAIL("Read data should not be equal to result data");
         return;
     }
@@ -68,8 +68,8 @@
         return;
     }
     /* Check that the data is correct */
-    if \(memcmp\(just_checking_act_data, just_checking_exp_data_1,
-                   just_checking_act_length\) == 0\) {
+
+    if \(\d+ > 0 && memcmp\(just_checking_act_data, just_checking_exp_data_1, just_checking_act_length\) == 0\) {
         TEST_FAIL("Read data should not be equal to result data");
         return;
     }
@@ -80,8 +80,8 @@
         return;
     }
     /* Check that the data is correct */
-    if \(memcmp\(just_checking_act_data, just_checking_exp_data_2,
-                   just_checking_act_length\) == 0\) {
+
+    if \(\d+ > 0 && memcmp\(just_checking_act_data, just_checking_exp_data_2, just_checking_act_length\) == 0\) {
         TEST_FAIL("Read data should not be equal to result data");
         return;
     }
diff --git a/tf_fuzz/tfz-cpp/regression/000018_000016_and_000017/exp_test.c b/tf_fuzz/tfz-cpp/regression/000018_000016_and_000017/exp_test.c
index 6f04987..5fadc9e 100644
--- a/tf_fuzz/tfz-cpp/regression/000018_000016_and_000017/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000018_000016_and_000017/exp_test.c
@@ -48,7 +48,7 @@
         return;
     }
 
-    TEST_LOG("Test to both read the value of a single asset multiple times and assign a sequence of values to a single asset");
+    TEST_LOG("Test to both read the value of a single asset multiple times and assign a sequence of values to a single asset\n");
 
 
     /* PSA calls to test: */
@@ -66,8 +66,8 @@
         return;
     }
     /* Check that the data is correct */
-    if (memcmp(indecisive_act_data, indecisive_exp_data,
-                   indecisive_act_length\) == 0\) {
+
+    if \(\d+ > 0 && memcmp\(indecisive_act_data, indecisive_exp_data, indecisive_act_length\) == 0\) {
         TEST_FAIL("Read data should not be equal to result data");
         return;
     }
@@ -85,8 +85,8 @@
         return;
     }
     /* Check that the data is correct */
-    if (memcmp(indecisive_act_data, indecisive_exp_data_1,
-                   indecisive_act_length) == 0) {
+
+    if \(\d+ > 0 && memcmp\(indecisive_act_data, indecisive_exp_data_1, indecisive_act_length\) == 0\) {
         TEST_FAIL("Read data should not be equal to result data");
         return;
     }
@@ -111,8 +111,8 @@
         return;
     }
     /* Check that the data is correct */
-    if (memcmp(indecisive_act_data, indecisive_exp_data_2,
-                   indecisive_act_length) == 0) {
+
+    if \(\d+ > 0 && memcmp\(indecisive_act_data, indecisive_exp_data_2, indecisive_act_length\) == 0\) {
         TEST_FAIL("Read data should not be equal to result data");
         return;
     }
diff --git a/tf_fuzz/tfz-cpp/regression/000019_read_asset_to_variable_set_other_asset/exp_test.c b/tf_fuzz/tfz-cpp/regression/000019_read_asset_to_variable_set_other_asset/exp_test.c
index a235358..f23da46 100644
--- a/tf_fuzz/tfz-cpp/regression/000019_read_asset_to_variable_set_other_asset/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000019_read_asset_to_variable_set_other_asset/exp_test.c
@@ -39,7 +39,7 @@
         return;
     }
 
-    TEST_LOG("Test to read an asset into a named variable the set another asset from that variable");
+    TEST_LOG("Test to read an asset into a named variable the set another asset from that variable\n");
 
 
     /* PSA calls to test: */
@@ -57,8 +57,8 @@
         return;
     }
     /* Check that the data is correct */
-    if (memcmp(transfer_data, source_exp_data,
-                   transfer_length) != 0) {
+
+    if \(\d+ > 0 && memcmp\(transfer_data, source_exp_data, transfer_length\) != 0\) {
         TEST_FAIL("Read data should be equal to result data");
         return;
     }
@@ -76,8 +76,8 @@
         return;
     }
     /* Check that the data is correct */
-    if (memcmp(transfer_data, intermediate_exp_data,
-                   transfer_length) != 0) {
+
+    if \(\d+ > 0 && memcmp\(transfer_data, intermediate_exp_data, transfer_length\) != 0\) {
         TEST_FAIL("Read data should be equal to result data");
         return;
     }
@@ -95,8 +95,8 @@
         return;
     }
     /* Check that the data is correct */
-    if (memcmp(destination_act_data, transfer,
-                   destination_act_length) != 0) {
+
+    if \(\d+ > 0 && memcmp\(destination_act_data, transfer, destination_act_length\) != 0\) {
         TEST_FAIL("Read data should be equal to result data");
         return;
     }
diff --git a/tf_fuzz/tfz-cpp/regression/000021_abbreviated_result_codes/exp_test.c b/tf_fuzz/tfz-cpp/regression/000021_abbreviated_result_codes/exp_test.c
index 93e16b5..6b4980d 100644
--- a/tf_fuzz/tfz-cpp/regression/000021_abbreviated_result_codes/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000021_abbreviated_result_codes/exp_test.c
@@ -34,7 +34,7 @@
         return;
     }
 
-    TEST_LOG("Test to more-specifically override TF-Fuzz's expected result");
+    TEST_LOG("Test to more-specifically override TF-Fuzz's expected result\n");
 
 
     /* PSA calls to test: */
@@ -45,8 +45,8 @@
         return;
     }
     /* Check that the data is correct */
-    if \(memcmp\(napoleon_act_data, napoleon_exp_data,
-                   napoleon_act_length\) == 0\) \{
+
+    if \(\d+ > 0 && memcmp\(napoleon_act_data, napoleon_exp_data, napoleon_act_length\) == 0\) \{
         TEST_FAIL("Read data should not be equal to result data");
         return;
     }
diff --git a/tf_fuzz/tfz-cpp/regression/000022_SST_offset/exp_test.c b/tf_fuzz/tfz-cpp/regression/000022_SST_offset/exp_test.c
index 4bc8e80..3d1fba6 100644
--- a/tf_fuzz/tfz-cpp/regression/000022_SST_offset/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000022_SST_offset/exp_test.c
@@ -35,7 +35,7 @@
         return;
     }
 
-    TEST_LOG("Test to set an offset on psa_ps_get()");
+    TEST_LOG("Test to set an offset on psa_ps_get()\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/regression/000023_SST_creation_flags/exp_test.c b/tf_fuzz/tfz-cpp/regression/000023_SST_creation_flags/exp_test.c
index 805495d..42a54a2 100644
--- a/tf_fuzz/tfz-cpp/regression/000023_SST_creation_flags/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000023_SST_creation_flags/exp_test.c
@@ -41,7 +41,7 @@
         return;
     }
 
-    TEST_LOG("Test to set SST creation flags");
+    TEST_LOG("Test to set SST creation flags\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/regression/000024_SST_write_once/exp_test.c b/tf_fuzz/tfz-cpp/regression/000024_SST_write_once/exp_test.c
index 0683390..c11a6ac 100644
--- a/tf_fuzz/tfz-cpp/regression/000024_SST_write_once/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000024_SST_write_once/exp_test.c
@@ -37,7 +37,7 @@
         return;
     }
 
-    TEST_LOG("Test to verify we can't write multiple times to a write-once SST asset");
+    TEST_LOG("Test to verify we can't write multiple times to a write-once SST asset\n");
 
 
     /* PSA calls to test: */
diff --git a/tf_fuzz/tfz-cpp/utility/data_blocks.hpp b/tf_fuzz/tfz-cpp/utility/data_blocks.hpp
index 723ee95..5b26e1b 100644
--- a/tf_fuzz/tfz-cpp/utility/data_blocks.hpp
+++ b/tf_fuzz/tfz-cpp/utility/data_blocks.hpp
@@ -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
  *
@@ -228,4 +228,3 @@
 
 
 #endif // DATA_BLOCKS_HPP
-
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 */
 }
-