dim_brightness test would return 1 even it works due to the potential rounding issue
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox Provider - Base |
Fix Released
|
Medium
|
Po-Hsu Lin |
Bug Description
Expected result:
dim_brightness script would return 0 to make the test pass, and brightness successfully dimmed.
Actual result:
It return 1, but brightness successfully dimmed.
Tested on 201306-13745
It looks like the script didn't pass the if statement in the brightness value checking algorithm:
def was_brightness_
'''See if the selected brightness was applied
Note: this doesn't guarantee that screen brightness
'''
if (self.get_
return False
else:
return True
root@201306-
checkbox:
Installed: (none)
Candidate: 0.18-0ubuntu2
Version table:
0.18-0ubuntu2 0
500 http://
root@201306-
plainbox:
Installed: 0.22+bzr3836+
Candidate: 0.22+bzr3836+
Version table:
*** 0.22+bzr3836+
500 http://
100 /var/lib/
0.5.4-1 0
500 http://
root@201306-
provider '2013.com.
provider '2013.com.
provider '2013.com.
provider '2013.com.
provider '2013.com.
provider '2013.com.
Related branches
- Sylvain Pineau (community): Approve
-
Diff: 14 lines (+2/-2)1 file modifiedproviders/plainbox-provider-checkbox/bin/brightness_test (+2/-2)
Changed in plainbox-provider-checkbox: | |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
status: | Confirmed → In Progress |
tags: | added: scripts |
Changed in plainbox-provider-checkbox: | |
status: | In Progress → Fix Committed |
milestone: | none → 0.23 |
Changed in plainbox-provider-checkbox: | |
status: | Fix Committed → Fix Released |
On a 14.04.3 I+A system (201404-14986), the dim_brightness script return 1 because of the brightness value checking algorithm mentioned above.
After running the script on this system, the brightness will be changed from 5273 to 2636, but the actual brightness is 2637. Therefore it's causing this issue.
We should double check this on other system to see how the rounding works.