Debian Bug report logs - #963265
simple-cdd: Improve qemu support

version graph

Package: simple-cdd; Maintainer for simple-cdd is Simple-CDD Developers <[email protected]>; Source for simple-cdd is src:simple-cdd (PTS, buildd, popcon).

Reported by: John Franklin <[email protected]>

Date: Sun, 21 Jun 2020 16:27:05 UTC

Severity: normal

Found in version simple-cdd/0.6.7

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Simple-CDD Developers <[email protected]>:
Bug#963265; Package simple-cdd. (Sun, 21 Jun 2020 16:27:08 GMT) (full text, mbox, link).


Acknowledgement sent to John Franklin <[email protected]>:
New Bug report received and forwarded. Copy sent to Simple-CDD Developers <[email protected]>. (Sun, 21 Jun 2020 16:27:08 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: John Franklin <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: simple-cdd: Improve qemu support
Date: Sun, 21 Jun 2020 12:25:39 -0400
[Message part 1 (text/plain, inline)]
Package: simple-cdd
Version: 0.6.7
Severity: normal


While using simple-cdd this weekend, I discovered a few things about the disk
image used with qemu-based testing.

The simple-cdd.conf.detailed file documents two settings for the disk image:
hd_img and hd_size.  These two settings are ignored by simple-cdd.

The default disk is a qcow image with the name qemu-test.hd.img stored in the
project root.  There are four improvements I'd like to make here:

* Change this to a qcow2 format to open up additional capabilities of the qcow2
format.  This may also improve performance (untested).

* Change the name to qemu-test.hd.qcow2 to make it more obvious to a developer
what the file is and its format.

* Move the file to the $simple_cdd_tmp folder, in a qemu subfolder, to better
organize it with the rest fo the temporary build files.

* Change the script to use qemu's -drive option to improve the speed of the
disk emulation.  With the existing -hda setting, even simple tests take hours
to complete, whereas -drive with some extra options reduces it to a couple
minutes.

The PR at https://salsa.debian.org/debian/simple-cdd/-/merge_requests/2
addresses all of the above issues:

* Honor hd_img and hd_size, if they're set.
* Change default hd_img format and extension to qcow2.
* Use -drive instead of -hda for more options and performance.
* If hd_img isn't an absolute path, store it in tmp/qemu.



-- System Information:
Debian Release: 10.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.5.0-0.bpo.2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages simple-cdd depends on:
ii  dctrl-tools         2.24-3
ii  debian-cd           3.1.25
ii  lsb-release         10.2019051400
ii  python3             3.7.3-1
ii  python3-simple-cdd  0.6.7
ii  reprepro            5.3.0-1
ii  rsync               3.1.3-6
ii  wget                1.20.1-1.1

Versions of packages simple-cdd recommends:
ii  dose-distcheck  5.0.1-12

Versions of packages simple-cdd suggests:
ii  qemu-kvm  1:3.1+dfsg-8+deb10u5

-- no debconf information
[signature.asc (application/pgp-signature, inline)]

Information forwarded to [email protected], Simple-CDD Developers <[email protected]>:
Bug#963265; Package simple-cdd. (Sun, 21 Jun 2020 17:36:07 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <[email protected]>:
Extra info received and forwarded to list. Copy sent to Simple-CDD Developers <[email protected]>. (Sun, 21 Jun 2020 17:36:07 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Vagrant Cascadian <[email protected]>
To: John Franklin <[email protected]>, [email protected]
Subject: Re: Bug#963265: simple-cdd: Improve qemu support
Date: Sun, 21 Jun 2020 10:32:03 -0700
[Message part 1 (text/plain, inline)]
On 2020-06-21, John Franklin wrote:
> While using simple-cdd this weekend, I discovered a few things about the disk
> image used with qemu-based testing.

Thanks for submitting!


> The simple-cdd.conf.detailed file documents two settings for the disk image:
> hd_img and hd_size.  These two settings are ignored by simple-cdd.
>
> The default disk is a qcow image with the name qemu-test.hd.img stored in the
> project root.  There are four improvements I'd like to make here:
>
>
> * Change this to a qcow2 format to open up additional capabilities of the qcow2
> format.  This may also improve performance (untested).

Sounds good.


> * Change the name to qemu-test.hd.qcow2 to make it more obvious to a developer
> what the file is and its format.

I'd prefer not to change the filename, as then it would have to be
changed whenever the file format changes.


> * Move the file to the $simple_cdd_tmp folder, in a qemu subfolder, to better
> organize it with the rest fo the temporary build files.

Mixed feelings on this; wondering if it wouldn't make sene to go into
the images folder instead. Or maybe $simple_cdd_tmp is fine.


> * Change the script to use qemu's -drive option to improve the speed of the
> disk emulation.  With the existing -hda setting, even simple tests take hours
> to complete, whereas -drive with some extra options reduces it to a couple
> minutes.

Great!


> The PR at https://salsa.debian.org/debian/simple-cdd/-/merge_requests/2
> addresses all of the above issues:

Thanks!


> * Honor hd_img and hd_size, if they're set.

Overall, looks good!

It does seem to change commented out example size, which doesn't seem
necessary, it only being an example? I think I had put an example in
there which was a non-default value for qemu-img at the time... but in
general I'd like to keep the defaults to whatever qemu-img spits out.


> * Change default hd_img format and extension to qcow2.

As mentioned above, fine with changing the format, but would rather not
change the filename extension.


> * Use -drive instead of -hda for more options and performance.

Sounds good; this project was started 15+ years ago and it shows! :)


> * If hd_img isn't an absolute path, store it in tmp/qemu.

Mixed feelings on that, as mentioned above.


Happy to merge most of it; could you re-write the git history so that
the contested points are in separate commits? Then I can merge the
uncontested patches while we sort out the remainder.


live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

Information forwarded to [email protected], Simple-CDD Developers <[email protected]>:
Bug#963265; Package simple-cdd. (Sun, 21 Jun 2020 23:54:02 GMT) (full text, mbox, link).


Acknowledgement sent to John Franklin <[email protected]>:
Extra info received and forwarded to list. Copy sent to Simple-CDD Developers <[email protected]>. (Sun, 21 Jun 2020 23:54:02 GMT) (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: John Franklin <[email protected]>
To: Vagrant Cascadian <[email protected]>
Cc: [email protected]
Subject: Re: Bug#963265: simple-cdd: Improve qemu support
Date: Sun, 21 Jun 2020 19:45:44 -0400

On Sun, Jun 21, 2020 at 1:32 PM, Vagrant Cascadian <[email protected]> 
wrote:
> On 2020-06-21, John Franklin wrote:
>> 
>>  * Change the name to qemu-test.hd.qcow2 to make it more obvious to 
>> a developer
>>  what the file is and its format.
> 
> I'd prefer not to change the filename, as then it would have to be
> changed whenever the file format changes.

If the format changes, then the extension should change, too.  That's 
not a heavy lift.

> 
>>  * Move the file to the $simple_cdd_tmp folder, in a qemu subfolder, 
>> to better
>>  organize it with the rest fo the temporary build files.
> 
> Mixed feelings on this; wondering if it wouldn't make sene to go into
> the images folder instead. Or maybe $simple_cdd_tmp is fine.

The images folder is where final artifacts end up.  All the rest of the 
intermediary files are in the tmp directory.  This patch puts it in a 
place dedicated to the qemu part of the process.  If you're runnig with 
UEFI firmware, you may want to include `-drive 
if=pflash,format=raw,file=profile_OVMF_VARS.fd` to define where the 
UEFI nvram should be stored.  In that case, the nvram file should also 
be in the tmp/qemu directory.  (Future patch coming!)

> It does seem to change commented out example size, which doesn't seem
> necessary, it only being an example? I think I had put an example in
> there which was a non-default value for qemu-img at the time... but in
> general I'd like to keep the defaults to whatever qemu-img spits out.

Size is a required parameter if the file doesn't already exist.

```
$ qemu-img create test.img
qemu-img: test.img: Image creation needs a size parameter
```

>>  * If hd_img isn't an absolute path, store it in tmp/qemu.
> 
> Mixed feelings on that, as mentioned above.
> 
> 
> Happy to merge most of it; could you re-write the git history so that
> the contested points are in separate commits? Then I can merge the
> uncontested patches while we sort out the remainder.


Done.

jf
-- 
John Franklin
[email protected]






Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Thu May 15 15:41:53 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.