Skip to content

tests: add smbios test#152

Draft
Coffeeri wants to merge 1 commit intocyberus-technology:mainfrom
Coffeeri:feat/smbios
Draft

tests: add smbios test#152
Coffeeri wants to merge 1 commit intocyberus-technology:mainfrom
Coffeeri:feat/smbios

Conversation

@Coffeeri
Copy link

@Coffeeri Coffeeri commented Feb 5, 2026

These tests verify against the following fields, selectable by dmidecode -s

  • system-manufacturer
  • sytem-product-name
  • system-version
  • system-serial-number
  • system-uuid
  • system-sku_number
  • system-family
  • chassis-asset-tag

The ladder is also verified within
/sys/devices/virtual/dmi/id/chassis_asset_tag

@Coffeeri Coffeeri self-assigned this Feb 5, 2026
These tests verify against the following fields, selectable by `dmidecode -s`
  - system-manufacturer
  - sytem-product-name
  - system-version
  - system-serial-number
  - system-uuid
  - system-sku_number
  - system-family
  - chassis-asset-tag

The ladder is also verified within
/sys/devices/virtual/dmi/id/chassis_asset_tag

On-behalf-of: SAP leander.kohler@sap.com
Signed-off-by: Leander Kohler <leander.kohler@cyberus-technology.de>
Copy link
Member

@phip1611 phip1611 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice first contribution to this repo :) Left a few remarks

@@ -66,6 +66,7 @@ nixpkgs.lib.nixosSystem {
environment.systemPackages = with pkgs; [
screen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use alphabetical ordering

@@ -29,6 +29,14 @@ let
all_static_bdf ? false,
# Whether we add a function ID to specific BDFs or not
use_bdf_function ? false,
Copy link
Member

@phip1611 phip1611 Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be written more idiomatic using

  smbios ? {
    system_product_name = null;
    system_version = null;
    system_serial_number = null;
    system_uuid = null;
    system_sku_number = null;
    system_family = null;
    chassis_asset_tag = null;
  },

Nix hasn't types but I think this would be a pragmatic approach

<type arch='x86_64'>hvm</type>
${
if
smbios_system_manufacturer != null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could create a helper function for that:

anySmbios = attrs: attrs.system_manufacturer != null || ` 

if anySmbios smbios then

</os>
${
if
smbios_system_manufacturer != null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants