Merge lp:~elopio/snappy/resize_test into lp:~snappy-dev/snappy/snappy-moved-to-github
Status: | Superseded |
---|---|
Proposed branch: | lp:~elopio/snappy/resize_test |
Merge into: | lp:~snappy-dev/snappy/snappy-moved-to-github |
Prerequisite: | lp:~elopio/snappy/parted_script |
Diff against target: |
233 lines (+182/-5) 4 files modified
_integration-tests/data/tpl/control (+1/-1) _integration-tests/scripts/install-test-initramfs (+19/-0) _integration-tests/scripts/resize-writable-test (+118/-0) _integration-tests/tests/initramfs_test.go (+44/-4) |
To merge this branch: | bzr merge lp:~elopio/snappy/resize_test |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Oliver Grawert | Needs Fixing | ||
Review via email: mp+270718@code.launchpad.net |
This proposal supersedes a proposal from 2015-09-10.
This proposal has been superseded by a proposal from 2015-09-13.
Commit message
Added tests for the resize partition forcing a resize and a no-op.
Description of the change
This is not the test I wanted to make because it's far from the initramfs-
But this is the easiest approach of all the ones I tried. We can build the initramfs on the same testbed, and use it with a simple reboot. I made notes to keep the research about building the init and making a simple boot. Now it's time to move on.
This is a kind of a complementary test, we add two conditions that are highly unlikely to be true at the same time.
note that our initrd allows to be compressed by different tools, there is no guarantee we always use xz. so before copying the initrd.img file to initrd.xz there should be a check that picks the right suffix and the right decompression tool in the install- test-initramfs script.
see my desktop initrd vs a current snappy rpi2 initrd:
ogra@anubis: ~/Devel/ packages$ file /boot/initrd. img-3.13. 0-63-generic img-3.13. 0-63-generic: gzip compressed data, from Unix, last modified: Sun Sep 6 10:58:31 2015 ~/Devel/ packages$ file /datengrab/ rpi/kernel/ device/ assets/ initrd. img rpi/kernel/ device/ assets/ initrd. img: LZMA compressed data, streamed
/boot/initrd.
ogra@anubis:
/datengrab/
I have a script snippet I use in such cases, see http:// paste.ubuntu. com/12334035/ (indeed you can trim that to only match xz, gzip and lzma, I don't think we use any of the others for initrd's)
also note that once Bug 1490608 is fixed, the "do_gpt()" function will be dropped and this test needs to be adjusted accordingly.