test: create scenario where Cactus denies CPU_OFF request

The test is expected to crash since SPMD panics upon receiving
the DENIED status for the PSCI framework response message.

Change-Id: I0c85fd78cd26c7db427bfc68eeed40e8a687664b
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
diff --git a/expect-lava/el3_panic.exp b/expect-lava/el3_panic.exp
new file mode 100644
index 0000000..a495c8b
--- /dev/null
+++ b/expect-lava/el3_panic.exp
@@ -0,0 +1,9 @@
+#
+# Copyright (c) 2025, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Expect script for Trusted Firmware Test Framework
+#
+
+expect_string+=('i;PANIC in EL3')
diff --git a/expect-lava/tftf_cpu_off.exp b/expect-lava/tftf_cpu_off.exp
new file mode 100644
index 0000000..77e2095
--- /dev/null
+++ b/expect-lava/tftf_cpu_off.exp
@@ -0,0 +1,18 @@
+#
+# Copyright (c) 2025 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Expect script for Trusted Firmware Test Framework
+#
+
+source $ci_root/expect-lava/trusted-firmware.inc
+
+prompt='Booting trusted firmware test framework'
+failures='Panic:'
+expect_string+=("i;${prompt};;${failures}")
+
+prompt='Running at NS-EL(1|2)'
+expect_string+=("i;${prompt}")
+
+expect_string+=('i;Powering off CPU')
diff --git a/expect/el3_panic.exp b/expect/el3_panic.exp
new file mode 100644
index 0000000..966370c
--- /dev/null
+++ b/expect/el3_panic.exp
@@ -0,0 +1,12 @@
+#
+# Copyright (c) 2025, 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]] handle-arguments.inc]
+
+expect_string "PANIC in EL3"
+exit_uart 0
diff --git a/expect/tftf_cpu_off.exp b/expect/tftf_cpu_off.exp
new file mode 100644
index 0000000..9576124
--- /dev/null
+++ b/expect/tftf_cpu_off.exp
@@ -0,0 +1,17 @@
+#
+# Copyright (c) 2025 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]] handle-arguments.inc]
+
+source [file join [file dirname [info script]] trusted-firmware.inc]
+
+expect_string "Booting trusted firmware test framework" "TFTF is booting"
+
+expect_re "Running at NS-EL(1|2)"
+
+expect_string "Powering off CPU"
diff --git a/group/spm-l2-boot-tests/fvp-default,fvp-spm,fvp-cactus-no-pwr-mgmt:fvp-spmd_crash-debug b/group/spm-l2-boot-tests/fvp-default,fvp-spm,fvp-cactus-no-pwr-mgmt:fvp-spmd_crash-debug
new file mode 100644
index 0000000..7c2a69d
--- /dev/null
+++ b/group/spm-l2-boot-tests/fvp-default,fvp-spm,fvp-cactus-no-pwr-mgmt:fvp-spmd_crash-debug
@@ -0,0 +1,6 @@
+#
+# Copyright (c) 2025, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
diff --git a/run_config/fvp-spmd_crash b/run_config/fvp-spmd_crash
new file mode 100644
index 0000000..4813b14
--- /dev/null
+++ b/run_config/fvp-spmd_crash
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2025, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+post_tf_build() {
+	build_fip BL33="$archive/tftf.bin" BL32="$archive/secure_hafnium.bin"
+}
+
+generate_lava_job_template() {
+	payload_type="tftf" gen_yaml_template
+}
+
+generate_lava_job() {
+	local model="base-aemv8a"
+
+	uart="0" timeout="600" file="tftf_cpu_off.exp" track_expect
+	uart="1" timeout="60" file="el3_panic.exp" set_primary="1" track_expect
+
+	model="$model" \
+		arch_version="8.5" \
+		has_branch_target_exception="1" \
+		has_smmuv3_params="1" \
+		memory_tagging_support_level="2" \
+		gicd_are_fixed_one="1" \
+		gicv3_ext_interrupt_range="1" \
+		gicd_ext_ppi_count="64" \
+		gicd_ext_spi_count="1024" \
+		gen_model_params
+
+	model="$model" gen_fvp_yaml
+}
diff --git a/tftf_config/fvp-cactus-no-pwr-mgmt b/tftf_config/fvp-cactus-no-pwr-mgmt
new file mode 100644
index 0000000..4a626b9
--- /dev/null
+++ b/tftf_config/fvp-cactus-no-pwr-mgmt
@@ -0,0 +1,4 @@
+CROSS_COMPILE=aarch64-none-elf-
+PLAT=fvp
+CACTUS_PWR_MGMT_SUPPORT=0
+TESTS=spm