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 | 2015-09-10 | Needs Fixing on 2015-09-11 | |
|
Review via email:
|
|||
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.
| Leo Arias (elopio) wrote : | # |
TODO, rename CurrentPartition to NextBootPartition. Add a proper CurrentPartition to make the test pass in bbb. Check that rpi also uses xz for the initrd.img
- 674. By Leo Arias on 2015-09-13
-
Merged with prerequisite.
- 675. By Leo Arias on 2015-09-22
-
First remove the original initrd.img.
- 676. By Leo Arias on 2015-09-23
-
For mbr, resize the partition with sfdisk and using sectors.
- 677. By Leo Arias on 2015-09-23
-
Added comments.
- 678. By Leo Arias on 2015-09-23
-
Added setup and teardown.
- 679. By Leo Arias on 2015-10-07
-
Merged with trunk.
- 680. By Leo Arias on 2015-10-07
-
Fixed the name of the initrd.img
- 681. By Leo Arias on 2015-10-07
-
Fixed the call to ExecCommand.
- 682. By Leo Arias on 2015-10-07
-
Fixed set up and tear down.


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.