#1 2023-01-25 15:30:26

camu72
Member
From: Salta - Argentina
Registered: 2015-07-12
Posts: 27

Mortmot2Test error in procedure TTestCoreBase.DmiSmbios

Hi ab,

Im running Mormot 2.0.4773 in a Windows 10 home 64 bits, Lazarus 2.2.0 and Freepascal 3.2.0.
my Notebook: HP Pavilion Notebook - 4xAMD A10-8700P Radeon R6

when run the test, there is a fail (not error) in procedure DMISmbios of test.core.base.bas in the line

...
 CheckAgainst(Smbios, _smbios); // << ( aprox. line 5588 in sourcecode of test.core.base )
 ...

and invoque this internal procedure of the same prcedure DMISmbios in the marked line whit (**)

procedure CheckAgainst(const full: TSmbiosInfo; const os: TSmbiosBasicInfos);
  begin
    CheckEqual(full.Bios.VendorName, os[sbiBiosVendor]);
    CheckEqual(full.Bios.Version, os[sbiBiosVersion]);
    CheckEqual(full.Bios.Release, os[sbiBiosRelease]);
    CheckEqual(full.Bios.Firmware, os[sbiBiosFirmware]);
    CheckEqual(full.Bios.BuildDate, os[sbiBiosDate]);
    CheckEqual(full.System.ProductName, os[sbiProductName]); // (** here is the fail )
    CheckEqual(full.System.Version, os[sbiVersion]);
    CheckEqual(full.System.Uuid, os[sbiUuid]);
    if full.Processor <> nil then
      CheckEqual(full.Processor[0].Manufacturer, os[sbiCpuManufacturer]);
    if full.Battery <> nil then
      CheckEqual(full.Battery[0].Manufacturer, os[sbiBatteryManufacturer]);
    if full.Oem <> nil then
      CheckEqual(full.Oem[0], os[sbiOem]);
  end;

in my notebook, according to debug, the values are:
full.System.ProductName: 'HP Notebook Pavilion'
os[sbiProductName        : 'HP Notevook Pavilion ' << with a final balnk.
which causes the check to fail, and we get a red message on the console.

Offline

#2 2023-01-25 20:22:00

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,207
Website

Re: Mortmot2Test error in procedure TTestCoreBase.DmiSmbios

Indeed!

Please try https://github.com/synopse/mORMot2/commit/befa8be3

Thanks for the detailed feedback: it helped a lot understand what was wrong.

Offline

Board footer

Powered by FluxBB