test: Add more SMBIOS data to sandbox
Some common smbios settings are not included with sandbox. Add these to test.dts so the data is more meaningful. Update smbios tests to match the new devicetree values. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -1938,6 +1938,30 @@
|
||||
|
||||
sysinfo {
|
||||
compatible = "sandbox,sysinfo-sandbox";
|
||||
|
||||
smbios {
|
||||
/* Type 1 table */
|
||||
system {
|
||||
manufacturer = "Sandbox Corp";
|
||||
product = "Sandbox Computer";
|
||||
version = "1.0";
|
||||
serial = "SB12345678";
|
||||
sku = "SANDBOX-SKU";
|
||||
family = "Sandbox_Family";
|
||||
};
|
||||
|
||||
/* Type 2 table */
|
||||
baseboard {
|
||||
manufacturer = "Sandbox Boards";
|
||||
product = "Sandbox Motherboard";
|
||||
asset-tag = "SB-ASSET-001";
|
||||
};
|
||||
|
||||
/* Type 3 table */
|
||||
chassis {
|
||||
manufacturer = "Sandbox Chassis Inc";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sysinfo-gpio {
|
||||
|
||||
@@ -43,22 +43,22 @@ static int cmd_smbios_test(struct unit_test_state *uts)
|
||||
ut_assert_nextline_empty();
|
||||
ut_assert_nextlinen("Handle 0x0001, DMI type 1, 27 bytes at");
|
||||
ut_assert_nextline("System Information");
|
||||
ut_assert_nextline("\tManufacturer: sandbox");
|
||||
ut_assert_nextline("\tProduct Name: sandbox");
|
||||
ut_assert_nextline("\tVersion: ");
|
||||
ut_assert_nextline("\tSerial Number: ");
|
||||
ut_assert_nextline("\tManufacturer: Sandbox Corp");
|
||||
ut_assert_nextline("\tProduct Name: Sandbox Computer");
|
||||
ut_assert_nextline("\tVersion: 1.0");
|
||||
ut_assert_nextline("\tSerial Number: SB12345678");
|
||||
ut_assert_nextline("\tUUID: 00000000-0000-0000-0000-000000000000");
|
||||
ut_assert_nextline("\tWake-up Type: Unknown");
|
||||
ut_assert_nextline("\tSKU Number: ");
|
||||
ut_assert_nextline("\tFamily: ");
|
||||
ut_assert_nextline("\tSKU Number: SANDBOX-SKU");
|
||||
ut_assert_nextline("\tFamily: Sandbox_Family");
|
||||
ut_assert_nextline_empty();
|
||||
ut_assert_nextlinen("Handle 0x0002, DMI type 2, 15 bytes at");
|
||||
ut_assert_nextline("Baseboard Information");
|
||||
ut_assert_nextline("\tManufacturer: sandbox");
|
||||
ut_assert_nextline("\tProduct Name: sandbox");
|
||||
ut_assert_nextline("\tManufacturer: Sandbox Boards");
|
||||
ut_assert_nextline("\tProduct Name: Sandbox Motherboard");
|
||||
ut_assert_nextline("\tVersion: ");
|
||||
ut_assert_nextline("\tSerial Number: ");
|
||||
ut_assert_nextline("\tAsset Tag: ");
|
||||
ut_assert_nextline("\tAsset Tag: SB-ASSET-001");
|
||||
ut_assert_nextline("\tFeature Flags: 0x00");
|
||||
ut_assert_nextline("\tChassis Location: ");
|
||||
ut_assert_nextline("\tChassis Handle: 0x0003");
|
||||
@@ -67,7 +67,7 @@ static int cmd_smbios_test(struct unit_test_state *uts)
|
||||
ut_assert_nextline_empty();
|
||||
ut_assert_nextlinen("Handle 0x0003, DMI type 3, 22 bytes at");
|
||||
ut_assert_nextline("Baseboard Information");
|
||||
ut_assert_nextline("\tManufacturer: ");
|
||||
ut_assert_nextline("\tManufacturer: Sandbox Chassis Inc");
|
||||
ut_assert_nextline("\tType: 0x02");
|
||||
ut_assert_nextline("\tVersion: ");
|
||||
ut_assert_nextline("\tSerial Number: ");
|
||||
|
||||
@@ -34,7 +34,7 @@ def test_cmd_smbios_sandbox(ubman):
|
||||
assert 'DMI type 0,' in output
|
||||
assert 'Vendor: U-Boot' in output
|
||||
assert 'DMI type 1,' in output
|
||||
assert 'Manufacturer: sandbox' in output
|
||||
assert 'Manufacturer: Sandbox Corp' in output
|
||||
assert 'DMI type 2,' in output
|
||||
assert 'DMI type 3,' in output
|
||||
assert 'DMI type 4,' in output
|
||||
|
||||
Reference in New Issue
Block a user