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.
Related PRs
Backport to SLE-15-SP6: #1378
Alternative PR: (Revoked, did not find agreement) #1374
coverage: 97.81%. remained the same
when pulling e8f9426280fea63fd484f48b3c320dd2561c1184 on huha-no-unlimited-lvs
into b3e7d0d6ab334f7f6484646a615fe1ad5e66744d on master.
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 expectsunsigned long long
forcreate_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.
Related PRs