Cleaning up and splitting subheap creation helpers and free block merge logic.
Should be the last refactoring needed before LFH specific changes, as implemented in https://gitlab.winehq.org/wine/wine/-/merge_requests/1628.
--
v2: ntdll: Keep subheap parent heap pointer and check for mismatches.
ntdll: Move the insertion of the first block out of create_subheap.
ntdll: Split create_free_block into block_init_free / insert_free_block.
ntdll: Merge prev and next free heap blocks in heap_free_block.
ntdll: Split heap blocks before creating or resizing used block.
ntdll: Clear BLOCK_FLAG_PREV_FREE flag out of shrink_used_block.
ntdll: Move heap allocation and initialization into RtlCreateHeap.
ntdll: Split heap region memory allocation to allocate_region helper.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1629
The test for ISmbiosInformationStatics_get_SerialNumber is broken on Window 10 testbot VMs, presumably because they don't have a serial number? It results in an HRESULT of E_UNEXPECTED. I added a broken test case for it. I'm assuming that normal installations of Windows return a valid serial number or at least something like "Not Specified" and not NULL. Also, on my Linux OS running cat /sys/class/dmi/id/product_serial returns "To be filled by O.E.M". So I added a fallback to return 0 as the number. Or is it fine to just return whatever string is found?
On the Windows 8 VMs, the test crashes at line 75, hr = ISmbiosInformationStatics_get_SerialNumber( smbios_statics, &serial ). Not sure what I should do in this case. I was hoping for a flag that checks if the VM is Windows 8, but there doesn't seem to be one. Should I wrap the test in if (0) or is there an alternative way?
Another weird thing is the test fails prematurely on only the 32-bit version of debian11b, saying that the runtimeclass is not registered. I'm assuming it's an issue with the testbot. Debian11 32 bit runs fine.
--
v4: windows.system.profile.systemmanufacturers: Implement ISmbiosInformationStatics_get_SerialNumber.
windows.system.profile.systemmanufacturers/tests: Add ISmbiosInformationStatics_get_SerialNumber tests.
wbemprox: Provide accurate SMBIOS serial number.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1588