[Tails-dev] automated tests

intrigeri intrigeri at boum.org
Sun Jun 24 08:20:23 CEST 2012


Hi,

intrigeri wrote (22 Jun 2012 17:56:12 GMT) :
> FWIW, g_file_storage is deprecated, and scheduled for removal in
> Linux 3.8. It is superseeded by g_mass_storage. So it would make
> sense to ask for g_mass_storage to be enabled in the Debian kernel,
> rather than g_file_storage, right?

tl;dr
 -> Yes. Looks like emulated USB 2.0 works fine with g_mass_storage.
    This is the perfect thing we need to run automated tests of
    the USB installer, persistence, and probably more :)

Step-by-step:

  $ sudo modprobe dummy-hcd is_high_speed=1
  $ dd if=/dev/zero of=/tmp/test.usb bs=1M count=2048
  $ sudo modprobe g_mass_storage file=/tmp/test.usb removable=1

Then I use qemu-kvm + libvirt USB 2.0 passthrough to lend that virtual
USB mass storage device to a VM, which I boot from a Tails 0.12 ISO,
that I clone onto the virtual USB device using the Tails
USB installer.

Then I unplug the virtual CD drive, and boot the same VM from the
virtual USB mass storage device, onto which I successfully setup
a Tails persistent volume. Rebooting, enabling the persistent volume
does work.

Note: if dummy-hcd is loaded with is_super_speed=1, looks like my
qemu/kvm VM can't see the virtual USB drive. Probably because qemu-kvm
only knows how to deal with USB 2.0, not 3.0.

Cheers,
-- 
  intrigeri
  | GnuPG key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc
  | OTR fingerprint @ https://gaffer.ptitcanardnoir.org/intrigeri/otr.asc


More information about the tails-dev mailing list