yast / yast-storage-ng

Rewrite of https://github.com/yast/yast-storage
http://yast.github.io/
GNU General Public License v2.0
14 stars 20 forks source link

Fix unlimited-sized fake device graphs (bsc#1221222) [SLE-15-SP6 Backport] #1378

Closed shundhammer closed 6 months ago

shundhammer commented 6 months ago

Target Branch

This is a backport of PR #1375 to SLE-15-SP6.

Bugzilla

https://bugzilla.suse.com/show_bug.cgi?id=1221222

Problem

Build failure of yast-storage-ng with the latest SWIG bindings.

Cause

The unit tests use DiskSize::unlimited in the YAML files for many test scenarios for LVs, and that results in a value -1 which clashes with the libstorage function prototype that expects unsigned long long for create_lvm_lv().

Obviously SWIG decides at runtime (!) which C++ function to call, and now the checks appear to be stricter: A -1 worked well until this version; it had obviously converted it to the bit pattern of the expected unsigned type, in this case resulting in 16 EiB - 1. Now that doesn't work anymore.

Fix

Don't use unlimited for LVM LVs in the YAML fake device graphs; that's unrealistic and not possible in real life anyway.

This fix is limited purely to unit test data. There is no code change.

yast-bot commented 6 months ago

:heavy_check_mark: Internal Jenkins job #8 successfully finished :heavy_check_mark: Created IBS submit request #325354