block_device state attribute evaluated incorrectly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox |
Fix Released
|
High
|
Brendan Donegan |
Bug Description
It has been noticed that sometimes disk tests will run anyway when their requirements should have failed. Some analysis has already been done on this and the situation is:
"If you look at the ResourceMap class and the contents of source in the eval() call, you'll see what is essentially a dictionary of lists of dictionaries... the bit in question looks like this:
{'block_
I was able to get the eval to return false instead of true when I changed the requirements to this:
block_device[
Obviously, this is not a fix, but does highlight what I think the issue is. I think it's returning true becuase in my test case, an object corresponding to 'name' in block_device IS sdb, AND an object corresponding to 'state' IS 'removable'. It's just not the right objects.
So I think eval() is looking through the entire contents of block_device for a match, rather than looking for something that contains name:sdb AND state 'other than removable'. "
This sums up pretty nicely that the 'state' attribute is not strongly tied to the device itself. The eval call will look at all the items in the block_device resource when determining if there is an item with state != removable
Related branches
- Marc Tardif (community): Approve
- Brendan Donegan (community): Needs Resubmitting
-
Diff: 111 lines (+19/-12)5 files modifieddebian/changelog (+3/-0)
jobs/disk.txt.in (+5/-5)
jobs/info.txt.in (+1/-1)
jobs/usb.txt.in (+1/-1)
scripts/block_device_resource (+9/-5)
- Mathieu Trudel-Lapierre: Approve
- Ubuntu branches: Pending requested
-
Diff: 16202 lines (+2632/-4581)140 files modifiedcheckbox/parsers/tests/udevadm.py (+13/-1)
checkbox/parsers/udevadm.py (+3/-1)
checkbox/user_interface.py (+7/-1)
debian/changelog (+68/-0)
debian/po/ast.po (+2/-2)
debian/po/cs.po (+2/-2)
debian/po/de.po (+2/-2)
debian/po/en_AU.po (+2/-2)
debian/po/en_GB.po (+2/-2)
debian/po/es.po (+2/-2)
debian/po/fr.po (+2/-2)
debian/po/he.po (+2/-2)
debian/po/hu.po (+2/-2)
debian/po/it.po (+2/-2)
debian/po/ja.po (+2/-2)
debian/po/nl.po (+2/-2)
debian/po/oc.po (+2/-2)
debian/po/pl.po (+2/-2)
debian/po/pt_BR.po (+2/-2)
debian/po/ro.po (+2/-2)
debian/po/ru.po (+2/-2)
debian/po/tr.po (+2/-2)
debian/po/uk.po (+2/-2)
debian/po/zh_CN.po (+2/-2)
debian/po/zh_TW.po (+2/-2)
jobs/audio.txt.in (+1/-1)
jobs/cpu.txt.in (+3/-2)
jobs/disk.txt.in (+6/-6)
jobs/info.txt.in (+2/-2)
jobs/local.txt.in (+1/-1)
jobs/miscellanea.txt.in (+1/-1)
jobs/usb.txt.in (+18/-0)
jobs/user_apps.txt.in (+3/-1)
plugins/apport_prompt.py (+5/-6)
po/ace.po (+19/-19)
po/af.po (+19/-19)
po/am.po (+19/-19)
po/ar.po (+19/-19)
po/ast.po (+19/-19)
po/az.po (+19/-19)
po/be.po (+19/-19)
po/bg.po (+19/-19)
po/bn.po (+19/-19)
po/bo.po (+19/-19)
po/br.po (+19/-19)
po/bs.po (+19/-19)
po/ca.po (+19/-19)
po/ca@valencia.po (+19/-19)
po/ckb.po (+19/-19)
po/cs.po (+19/-19)
po/cy.po (+19/-19)
po/da.po (+19/-19)
po/de.po (+19/-19)
po/dv.po (+19/-19)
po/el.po (+19/-19)
po/en_AU.po (+19/-19)
po/en_CA.po (+19/-19)
po/en_GB.po (+19/-19)
po/eo.po (+19/-19)
po/es.po (+19/-19)
po/et.po (+19/-19)
po/eu.po (+19/-19)
po/fa.po (+19/-19)
po/fi.po (+19/-19)
po/fr.po (+19/-19)
po/ga.po (+19/-19)
po/gd.po (+19/-19)
po/gl.po (+19/-19)
po/he.po (+19/-19)
po/hi.po (+19/-19)
po/hr.po (+19/-19)
po/hu.po (+19/-19)
po/hy.po (+19/-19)
po/id.po (+19/-19)
po/is.po (+19/-19)
po/it.po (+19/-19)
po/ja.po (+19/-19)
po/jbo.po (+19/-19)
po/ka.po (+19/-19)
po/kk.po (+19/-19)
po/km.po (+19/-19)
po/kn.po (+19/-19)
po/ko.po (+19/-19)
po/ku.po (+19/-19)
po/ky.po (+19/-19)
po/lt.po (+19/-19)
po/lv.po (+19/-19)
po/mk.po (+19/-19)
po/ml.po (+19/-19)
po/mr.po (+19/-19)
po/ms.po (+19/-19)
po/my.po (+19/-19)
po/nb.po (+19/-19)
po/nds.po (+19/-19)
po/ne.po (+19/-19)
po/nl.po (+19/-19)
po/nn.po (+19/-19)
po/oc.po (+19/-19)
po/pl.po (+19/-19)
po/ps.po (+19/-19)
po/pt.po (+19/-19)
po/pt_BR.po (+19/-19)
po/ro.po (+19/-19)
po/ru.po (+19/-19)
po/sd.po (+19/-19)
po/shn.po (+19/-19)
po/si.po (+19/-19)
po/sk.po (+19/-19)
po/sl.po (+19/-19)
po/sq.po (+120/-84)
po/sr.po (+19/-19)
po/sv.po (+19/-19)
po/ta.po (+19/-19)
po/te.po (+19/-19)
po/th.po (+19/-19)
po/tr.po (+19/-19)
po/ug.po (+19/-19)
po/uk.po (+36/-34)
po/ur.po (+19/-19)
po/uz.po (+19/-19)
po/vi.po (+19/-19)
po/zh_CN.po (+19/-19)
po/zh_HK.po (+19/-19)
po/zh_TW.po (+19/-19)
qt/checkbox-qt-head.svg (+163/-0)
qt/checkbox.svg (+0/-2478)
qt/frontend/qtfront.cpp (+34/-38)
qt/frontend/qtfront.h (+3/-3)
qt/frontend/qtfront.ui (+158/-173)
qt/frontend/treemodel.cpp (+0/-1)
scripts/block_device_resource (+39/-4)
scripts/cycle_vts (+27/-0)
scripts/disk_read_performance_test (+14/-1)
scripts/disk_smart (+16/-8)
scripts/efi_resource (+1/-1)
scripts/gconf_resource (+5/-6)
scripts/gpu_test (+0/-4)
scripts/network_check (+2/-1)
scripts/network_device_info (+167/-7)
scripts/package_resource (+2/-1)
Changed in checkbox: | |
assignee: | nobody → Brendan Donegan (brendan-donegan) |
status: | New → In Progress |
importance: | Undecided → High |
Changed in checkbox: | |
status: | In Progress → Fix Committed |
Changed in checkbox: | |
status: | Fix Committed → Fix Released |