Bug fix in the expect script deployed by the fvp-aemv8a.tbb.disable_dyn_auth run fragment.
Prior to this patch, the expect script didn't watch the strings
emitted by the TFTF to the UART0 port. Hence, even when all the
tests in the TFTF test suite finished successfully, the expect
script didn't terminate the model in a clean way, rather a timeout
led to the model termination.
This patch adds a new expect script which broadly tracks two patterns
that are put to the UART0 console by the CPUs:
1. Related to the disabling of image authorization dynamically
2. Booting of BL32(TFTF image) and completion of tests
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
Change-Id: I20a6bcd6a0134de064ceef6e8999f87a6c4306b3
diff --git a/expect/disable_dyn_auth.exp b/expect/disable_dyn_auth.inc
similarity index 95%
rename from expect/disable_dyn_auth.exp
rename to expect/disable_dyn_auth.inc
index 50dd5be..73e7497 100644
--- a/expect/disable_dyn_auth.exp
+++ b/expect/disable_dyn_auth.inc
@@ -29,5 +29,7 @@
puts "<<Dynamic Authentication not disabled>>"
exit_uart -1
}
+ "BL1: Booting BL31" {
+ puts "BL31 Booting"
+ }
}
-exit_uart 0
diff --git a/expect/disable_dyn_auth_tftf.exp b/expect/disable_dyn_auth_tftf.exp
new file mode 100644
index 0000000..8ca24fd
--- /dev/null
+++ b/expect/disable_dyn_auth_tftf.exp
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2020 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Expect script for Trusted Firmware Test Framework
+#
+
+source [file join [file dirname [info script]] disable_dyn_auth.inc]
+
+expect_string "Booting trusted firmware test framework" "Starting TFTF"
+expect_re "Running at NS-EL(1|2)"
+
+expect {
+ "Tests Failed : 0" {
+ puts "<<TFTF Success>>"
+ exit_uart 0
+ }
+ "Tests Passed : 0" {
+ puts "<<TFTF no tests passed>>"
+ exit_uart -1
+ }
+ -re "Tests Failed : \[^0]" {
+ puts "<<TFTF Fail>>"
+ exit_uart -1
+ }
+ timeout {
+ exit_timeout
+ }
+}
+
+exit_uart -1
diff --git a/run_config/fvp-aemv8a.tbb.disable_dyn_auth b/run_config/fvp-aemv8a.tbb.disable_dyn_auth
index 0957e4a..67da466 100644
--- a/run_config/fvp-aemv8a.tbb.disable_dyn_auth
+++ b/run_config/fvp-aemv8a.tbb.disable_dyn_auth
@@ -20,5 +20,5 @@
}
fetch_tf_resource() {
- uart="0" file="disable_dyn_auth.exp" track_expect
+ uart="0" file="disable_dyn_auth_tftf.exp" track_expect
}