Project

General

Profile

Feature #5294

Use libguestfs for better disk handling in the test suite

Added by Tails over 6 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Test suite
Target version:
Start date:
01/10/2015
Due date:
% Done:

100%

Feature Branch:
test/7822-untrusted-partitions
Type of work:
Code
Blueprint:
Starter:
No
Affected tool:

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 or LUKS 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 than raw (unless something like qemu-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 suiteResolved

Feature #8672: Evaluate how libguestfs in Jessie supports the usecases we have for itResolved

Feature #8673: Use ruby-guestfs wherever it's worth it in the automated test suiteResolved

History

#1 Updated by intrigeri about 6 years ago

  • Category set to Test suite
  • Starter set to No

#2 Updated by intrigeri about 6 years ago

  • Subject changed from test suite: libguestfs to Improve test suite implementation with libguestfs

#3 Updated by intrigeri over 5 years ago

  • Subject changed from Improve test suite implementation with libguestfs to Use libguestfs for better disk handling in the test suite

#4 Updated by anonym almost 5 years ago

  • Assignee set to kytv
  • Target version set to Tails_1.8

#5 Updated by anonym almost 5 years ago

It's ok to focus on getting this working on a Jessie host and ignore Wheezy.

#7 Updated by intrigeri almost 5 years ago

  • Assignee changed from kytv to anonym
  • Target version changed from Tails_1.8 to Tails_1.7

#8 Updated by intrigeri almost 5 years ago

  • 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 #8673.

#9 Updated by anonym almost 5 years ago

intrigeri wrote:

Can this ticket be closed once test/7822-untrusted-partitions is merged?

Yes but I think closing the child ticket #8672 also is required.

It seems to be a duplicate of #8673.

I do not understand. What is "it"? #7822 or the current ticket (#5294)? I do not agree in either case, so can you explain?

#10 Updated by intrigeri almost 5 years ago

intrigeri wrote:

Can this ticket be closed once test/7822-untrusted-partitions is merged?

Yes but I think closing the child ticket #8672 also is required.

Hence my question on #8672. Current Redmine state is confusing.

It seems to be a duplicate of #8673.

I do not understand. What is "it"? #7822 or the current ticket (#5294)? I do not agree in either case, so can you explain?

Forget it, I was confused.

#11 Updated by anonym almost 5 years ago

  • 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 #8672 also is required.

Hence my question on #8672. Current Redmine state is confusing.

Yeah, sorry. I've closed that one, and close this one too now.

#12 Updated by BitingBird over 4 years ago

  • Status changed from Fix committed to Resolved

#13 Updated by sajolida over 4 years ago

  • QA Check deleted (Pass)

#14 Updated by sajolida over 4 years ago

  • QA Check set to Pass

Also available in: Atom PDF