test/install: fix test for undefined behavior in slot selection handling#476
Conversation
Codecov Report
@@ Coverage Diff @@
## master #476 +/- ##
======================================
Coverage 66.6% 66.6%
======================================
Files 22 22
Lines 6370 6370
======================================
Hits 4243 4243
Misses 2127 2127Continue to review full report at Codecov.
|
|
@elboulangero This should be of interest for you, too. |
|
I didn't look closely, but I wonder if we need something like ejoerns@9230105 for this commit to be correct. |
|
@ukleinek it works without, but more accidentially than intended. And there is no guarantee that it will work in the future, too. Thus for this PR it makes sense to include the commit you mentioned to fully fix the known issues in this test. |
|
I would swap the order of the two commits, other than that it looks fine for me now |
ukleinek
left a comment
There was a problem hiding this comment.
Typo in commit log: s/childs/children/
ukleinek
left a comment
There was a problem hiding this comment.
Typo in commit log: s/Someting/Something/
bca21c4 to
604ba7c
Compare
|
@ukleinek I've fixed the typos and, while at it, I also changed the order of commits if that looks cleaner to you ;) |
This test lacked proper setting of 'bootslot' context property which is required for a reliable test of determine_slot_states(). Up to now, the property was only set correctly by the previously executed test. Something we should not rely on... Signed-off-by: Enrico Joerns <ejo@pengutronix.de>
For the triple-redundancy rootfs.0, rootfs.1, rootfs.2 (including their children), we have rootfs.0 set to 'active' so far and thus both rootfs.2 and rootfs.2 being detected as 'inactive'. For this case, there is still no real definition of when or whether to select rootfs.1 or rootfs.2. Prior to this, the test checked for the selected slot being rootfs.1 which was valid for the concrete implementation, but mainly depending on the order that was given by the GHashTable (iterator) implementation. In recent glib version this changed resulting in rootfs.2 being selected instead. We adapt the test for checking correctly for both cases. Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
604ba7c to
573ed27
Compare
|
@ukleinek really reliably fixed typos now. |
ukleinek
left a comment
There was a problem hiding this comment.
LGTM now. Thanks for your effort to address these problems.
For the triple-redundancy rootfs.0, rootfs.1, rootfs.2 (including their
childs), we have rootfs.0 set to 'active' so far and thus both rootfs.2
and rootfs.2 being detected as 'inactive'.
For this case, there is still no real definition of when or whether to select
rootfs.1 or rootfs.2.
Prior to this, the test checked for the selected slot being rootfs.1
which was valid for the concrete implementation, but mainly depending on
the order that was given by the GHashTable (iterator) implementation.
In recent glib version this changed resulting in rootfs.2 being selected
instead.
We adapt the test for checking correctly for both cases.
Supersedes #475