[libvirt] [PATCH 30/35] tests: qemublock: Add test for raw luks disk format

Peter Krempa pkrempa at redhat.com
Thu May 3 07:02:07 UTC 2018


On Wed, May 02, 2018 at 19:07:27 -0400, John Ferlan wrote:
> 
> 
> On 04/25/2018 11:15 AM, Peter Krempa wrote:
> > Apart from adding test data add a function which sets up fake secrets
> > for the test.
> > 
> > The top level disk image would generate the following '-drive' cmdline:
> > 
> > -drive file=/path/luks.img,key-secret=test1-encalias,format=luks,if=none,id=drive-dummy
> > -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
> > 
> > Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> > ---
> >  tests/qemublocktest.c                              | 42 ++++++++++++++++++++++
> >  .../qemublocktestdata/xml2json/file-raw-luks.json  | 13 +++++++
> >  tests/qemublocktestdata/xml2json/file-raw-luks.xml | 15 ++++++++
> >  3 files changed, 70 insertions(+)
> >  create mode 100644 tests/qemublocktestdata/xml2json/file-raw-luks.json
> >  create mode 100644 tests/qemublocktestdata/xml2json/file-raw-luks.xml
> > 
> 
> Later on auth gets tested, so that's fine. Unless you want to make a
> "simple" auth test to partner with this simple luks encryption one.

My motivation here was to add a simple case along with the code faking
the authentication/encryption data, so that it can be seen and then add
the cases separately.

Also this is an artifact of approach I took while implementing it. I
originally added this case to test the implementation of encryption I've
done. Later when I implemented everything I've added the full test.

> 
> Reviewed-by: John Ferlan <jferlan at redhat.com>
> 
> John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180503/6d5a665e/attachment-0001.sig>


More information about the libvir-list mailing list