summaryrefslogtreecommitdiff
path: root/test/cmd/cpuid.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-10-18 22:32:45 -0600
committerTom Rini <trini@konsulko.com>2024-10-18 22:32:45 -0600
commit7036abbd5c3934059b020d5fd5bcb8b3bf3c788c (patch)
tree0fb8fd19b51862cf5742ec68ef889e4ad441dde7 /test/cmd/cpuid.c
parentf83e36fd83c74b4e28a45a9d56abc4ad9b7848b9 (diff)
parent44917d586657eeae0401bc29af80011a264002e7 (diff)
Merge tag 'dm-pull-17oct24-take2' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
A few new x86 commands and minor improvements expo improvements binman support for signing FIT images
Diffstat (limited to 'test/cmd/cpuid.c')
-rw-r--r--test/cmd/cpuid.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/cmd/cpuid.c b/test/cmd/cpuid.c
new file mode 100644
index 00000000000..e07f5fd4696
--- /dev/null
+++ b/test/cmd/cpuid.c
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Tests for cpuid command
+ *
+ * Copyright 2024 Google LLC
+ * Written by Simon Glass <sjg@chromium.org>
+ */
+
+#include <test/cmd.h>
+#include <test/ut.h>
+
+static int cmd_test_cpuid(struct unit_test_state *uts)
+{
+ ut_assertok(run_commandf("cpuid 1"));
+ ut_assert_nextline("eax 00060fb1");
+ ut_assert_nextline("ebx 00000800");
+ ut_assert_nextline("ecx 80002001");
+ ut_assert_nextline("edx 078bfbfd");
+
+ return 0;
+}
+CMD_TEST(cmd_test_cpuid, UTF_CONSOLE);