Feature #5294
Use libguestfs for better disk handling in the test suite
100%
Description
Currently we use an ad-hoc dd
/@parted@ combo in the storage helper to create disk images with formatted filesystems outside of Tails to later be used within Tails (e.g. for the untrusted partitions feature). This limits us in many ways:
- the disk can only be backed by a
raw
image, which consumes its full capacity in disk space on the host unlike e.g.qcow2
images. - we can only create filesystems supported by
parted
which are very limited in number. - acting directly on the block device (= image) if we want to use
LVM
orLUKS
will probably get complicated permission-wise as the test suite runs as an unprivileged user. It gets impossible if we’d use image types other thanraw
(unless something likeqemu-nbd
is used to create virtual block devices of the images, which again will require privileges).
This forces us to use udisks
from inside Tails to query disk information in usb_install.feature
, but this should preferably be made from the "outside" (i.e. no inside Tails, which is what we test). In the same feature we also have to completely boot Tails again in the only the expected files should persist on USB drive ...
step, which is really slow, and have proved to be quite error prone when changes are made to the steps it uses (one usually only looks for step usage in .feature
files, and forgets to look inside step definition files).
libguestfs supports all of the above and is part of the libvirt "family" of tools (and deal with permissions in the same, sane way), and it has ruby bindings. It seems like a perfect fit.
Subtasks
Feature #8671: List the usecases we could have for libguestfs in the automated test suite | Resolved | 100 |
|||
Feature #8672: Evaluate how libguestfs in Jessie supports the usecases we have for it | Resolved | 100 |
|||
Feature #8673: Use ruby-guestfs wherever it's worth it in the automated test suite | Resolved | 100 |
History
#1 Updated by intrigeri 2013-10-04 09:14:03
- Category set to Test suite
- Starter set to No
#2 Updated by intrigeri 2013-10-04 09:16:26
- Subject changed from test suite: libguestfs to Improve test suite implementation with libguestfs
#3 Updated by intrigeri 2014-07-19 20:04:47
- Subject changed from Improve test suite implementation with libguestfs to Use libguestfs for better disk handling in the test suite
#4 Updated by anonym 2015-01-09 13:53:15
- Assignee set to kytv
- Target version set to Tails_1.8
#5 Updated by anonym 2015-01-09 13:54:16
It’s ok to focus on getting this working on a Jessie host and ignore Wheezy.
#6 Updated by anonym 2015-01-10 17:17:17
- blocks #8668 added
#7 Updated by intrigeri 2015-01-10 18:19:41
- Assignee changed from kytv to anonym
- Target version changed from Tails_1.8 to Tails_1.7
#8 Updated by intrigeri 2015-02-08 15:26:28
- QA Check set to Info Needed
Can this ticket be closed once test/7822-untrusted-partitions
is merged? It seems to be a duplicate of Feature #8673.
#9 Updated by anonym 2015-02-09 09:32:31
intrigeri wrote:
> Can this ticket be closed once test/7822-untrusted-partitions
is merged?
Yes but I think closing the child ticket Feature #8672 also is required.
> It seems to be a duplicate of Feature #8673.
I do not understand. What is “it”? Feature #7822 or the current ticket (Feature #5294)? I do not agree in either case, so can you explain?
#10 Updated by intrigeri 2015-02-09 10:48:37
> intrigeri wrote:
>> Can this ticket be closed once test/7822-untrusted-partitions
is merged?
> Yes but I think closing the child ticket Feature #8672 also is required.
Hence my question on Feature #8672. Current Redmine state is confusing.
>> It seems to be a duplicate of Feature #8673.
> I do not understand. What is “it”? Feature #7822 or the current ticket (Feature #5294)? I do not agree in either case, so can you explain?
Forget it, I was confused.
#11 Updated by anonym 2015-02-10 11:59:44
- Status changed from Confirmed to Fix committed
- Assignee deleted (
anonym) - Target version changed from Tails_1.7 to Tails_1.3
- QA Check changed from Info Needed to Pass
- Feature Branch set to test/7822-untrusted-partitions
intrigeri wrote:
> > intrigeri wrote:
> >> Can this ticket be closed once test/7822-untrusted-partitions
is merged?
>
> > Yes but I think closing the child ticket Feature #8672 also is required.
>
> Hence my question on Feature #8672. Current Redmine state is confusing.
Yeah, sorry. I’ve closed that one, and close this one too now.
#12 Updated by BitingBird 2015-02-24 22:53:31
- Status changed from Fix committed to Resolved
#13 Updated by sajolida 2015-08-05 09:48:49
- QA Check deleted (
Pass)
#14 Updated by sajolida 2015-08-05 09:49:10
- QA Check set to Pass