improve redirect role input validation. Fixes #1651 #1652
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this pr it was found that a non btrfs redirect role could be set on a device that also contained a btrfs partition. This was not intended behaviour and results in an import option that is non functional. This pr adds additional redirect role input validation to reject non btrfs partition redirection when a device also contains a btrfs partition. The check is only made when a role change is requested. This allows for the default whole disk wipe option.
As this is a bug fix for (my) code contributed in pr #1622 I have provided the additional manual testing steps required to identify and confirm the fix for this issue. These steps are additional to those detailed in #1622 .
Initial test drive partition setup(using sata bus this time):
Pre pr test failure:
status - no active redirect (default)
This is a FAIL as it is not intended behaviour.
Post pr test procedure:
status - no active redirect (default)
repeat above “Initial test drive partition setup” as disk is now blank.
status - no active redirect (default)
leading to the next series of tests:
status - active btrfs redirect:
leading to the next series of tests:
status - active non btrfs redirect (wiped in previous step):
(disk rescan required to update fs info)
During all of the "Post pr test procedure" steps above, the disk page 'flag' icons and their tool-tips, as well as any role config page warning messages, were as intended. Given the know issue identified in #1623 .
All manual tests detailed in pr #1622 were also re run and no regression was observed.
Fixes #1651