This is an automated email from Gerrit. "Evgeniy Naydanov <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9730
-- gerrit commit 39444479acc0dcf10851af4c170185dc3ecd085e Author: Evgeniy Naydanov <[email protected]> Date: Thu May 28 15:26:55 2026 +0300 testing: tcl_commands: test `target smp` command The patch adds tests targeting `target smp` command. To check the cuurent state, added `smp` commands to the `testee` target type. Change-Id: I2a8f6dac3f8461c498431b376bc894c1260f29ff Signed-off-by: Evgeniy Naydanov <[email protected]> diff --git a/src/target/testee.c b/src/target/testee.c index 687565271d..68fa882f27 100644 --- a/src/target/testee.c +++ b/src/target/testee.c @@ -10,6 +10,7 @@ #include <helper/log.h> +#include "smp.h" #include "target.h" #include "target_type.h" #include "hello.h" @@ -22,6 +23,9 @@ static const struct command_registration testee_command_handlers[] = { .chain = hello_command_handlers, .usage = "", }, + { + .chain = smp_command_handlers, + }, COMMAND_REGISTRATION_DONE }; diff --git a/testing/tcl_commands/test-target-smp-command.cfg b/testing/tcl_commands/test-target-smp-command.cfg index e7cd7506f4..ff4ab02e09 100644 --- a/testing/tcl_commands/test-target-smp-command.cfg +++ b/testing/tcl_commands/test-target-smp-command.cfg @@ -1,15 +1,57 @@ # SPDX-License-Identifier: GPL-2.0-or-later +namespace import testing_helpers::* + adapter driver dummy jtag newtap tap0 cpu -irlen 2 jtag newtap tap1 cpu -irlen 2 target create tgt0 testee -chain-position tap0.cpu target create tgt1 testee -chain-position tap1.cpu +init + target smp tgt0 tgt1 +check_matches on {tgt0 smp} +check_matches on {tgt1 smp} + +target smp not_a_target +check_matches on {tgt0 smp} +check_matches on {tgt1 smp} target smp tgt0 +check_matches on {tgt0 smp} +check_matches off {tgt1 smp} + +target smp tgt0 not_a_target +check_matches on {tgt0 smp} +check_matches off {tgt1 smp} + +target smp tgt0 +check_matches on {tgt0 smp} +check_matches off {tgt1 smp} target smp tgt0 tgt0 +check_matches on {tgt0 smp} +check_matches off {tgt1 smp} + +target smp tgt1 +check_matches on {tgt0 smp} +check_matches on {tgt1 smp} + +target smp tgt0 tgt1 +check_matches on {tgt0 smp} +check_matches on {tgt1 smp} + +target smp tgt1 +check_matches off {tgt0 smp} +check_matches on {tgt1 smp} + +target smp tgt0 tgt1 +check_matches on {tgt0 smp} +check_matches on {tgt1 smp} + +target smp tgt0 tgt1 +check_matches on {tgt0 smp} +check_matches on {tgt1 smp} shutdown --
