disk/storage_device_sda fails on non-English systems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox Provider - Base |
Fix Released
|
High
|
Pierre Equoy |
Bug Description
[Steps]
1. Run plainbox test case /disk/storage_
2. Check if case passes
[Expected Results]
Case should pass
[Actual results]
Case fail with error message "dev/sda doesn't report a size".
ii plainbox 0.22.2+
ii plainbox-
ii plainbox-
ii plainbox-
ii plainbox-
ii plainbox-
ii plainbox-
ii plainbox-
ii python3-plainbox 0.22.2+
Related branches
- Zygmunt Krynicki (community): Needs Fixing
-
Diff: 59 lines (+34/-2)2 files modifiedplainbox/plainbox/impl/ctrl.py (+2/-2)
plainbox/plainbox/impl/test_ctrl.py (+32/-0)
- Zygmunt Krynicki (community): Approve
-
Diff: 104 lines (+25/-5)2 files modifiedplainbox/plainbox/impl/ctrl.py (+8/-1)
plainbox/plainbox/impl/test_ctrl.py (+17/-4)
Changed in plainbox-provider-checkbox: | |
importance: | Undecided → High |
Changed in plainbox-provider-checkbox: | |
status: | New → Confirmed |
Changed in plainbox-provider-checkbox: | |
milestone: | none → 0.22 |
assignee: | nobody → Pierre Equoy (pierre-equoy) |
Changed in plainbox-provider-checkbox: | |
status: | Confirmed → Fix Committed |
Changed in plainbox-provider-checkbox: | |
status: | Fix Committed → Fix Released |
Did some investigation and found out the main reason seems to be in line #52 of script /usr/lib/ plainbox- provider- checkbox/ storage_ test:
size=`parted -l -s |grep "Disk.*${disk}" |awk '{print $3}'`
On a Simplified Chinese Kylin system, perform the command "$sudo parted -l -s" and you will notice in the output that the string "Disk" is now replaced by the Chinese characters standing for "disk" (i.g. "磁盘").
The command size=`parted -l -s |grep "Disk.*${disk}" |awk '{print $3}'` therefore returns nothing, the script will terminate with "exit 1" and test case will fail.
Test case passed when I manually replaced "Disk" in line #52 of /usr/lib/ plainbox- provider- checkbox/ storage_ test to "磁盘".