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

Fixed crash in the proposal code (bsc#1209523) #1324

Closed lslezak closed 1 year ago

lslezak commented 1 year ago

Problem

Changing the candidate device in the D-Installer to a non-existing device caused a crash undefined method 'partition_table' for nil:NilClass:

# dinstallerctl storage selected_devices /dev/sdb
/usr/share/YaST2/lib/y2storage/guided_proposal.rb:274:in `block in candidate_devices_with_empty_partition_table': undefined method `partition_table' for nil:NilClass; caused by 1 sender=:1.0 -> dest=org.opensuse.DInstaller.Storage serial=12 reply_serial= path=/org/opensuse/DInstaller/Storage1; interface=org.opensuse.DInstaller.Storage1.Proposal.Calculator; member=Calculate error_name=; caused by 3 sender=:1.4 -> dest=:1.0 serial=36 reply_serial=12 path=; interface=; member= error_name=org.freedesktop.DBus.Error.Failed (DBus::Error)

Solution

Testing

coveralls commented 1 year ago

Coverage Status

Coverage: 97.755%. Remained the same when pulling dae1f66362bbf19f16c656c3fb6b2adb8f74f0ce on invalid_candidate_crash into 1908f010776b9944940abaa305559cd346f8df2b on master.

yast-bot commented 1 year ago

:heavy_check_mark: Public Jenkins job #455 successfully finished :heavy_check_mark: Created OBS submit request #1073346