Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
qtest: bail from irq_intercept_in if name is specified
Named interception of in-GPIOs is not supported yet.

Signed-off-by: Chris Laplante <chris@laplante.io>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20230728160324.1159090-5-chris@laplante.io
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
mostthingsweb authored and pm215 committed Aug 22, 2023
1 parent a8610f8 commit fe692f7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions softmmu/qtest.c
Expand Up @@ -397,9 +397,11 @@ static void qtest_process_command(CharBackend *chr, gchar **words)
|| strcmp(words[0], "irq_intercept_in") == 0) {
DeviceState *dev;
NamedGPIOList *ngl;
bool is_named;
bool is_outbound;

g_assert(words[1]);
is_named = words[2] != NULL;
is_outbound = words[0][14] == 'o';
dev = DEVICE(object_resolve_path(words[1], NULL));
if (!dev) {
Expand All @@ -408,6 +410,12 @@ static void qtest_process_command(CharBackend *chr, gchar **words)
return;
}

if (is_named && !is_outbound) {
qtest_send_prefix(chr);
qtest_send(chr, "FAIL Interception of named in-GPIOs not yet supported\n");
return;
}

if (irq_intercept_dev) {
qtest_send_prefix(chr);
if (irq_intercept_dev != dev) {
Expand Down

0 comments on commit fe692f7

Please sign in to comment.