From 858ab8017253a870a35a72676a9c83cf5fdf2bac Mon Sep 17 00:00:00 2001 From: Tom DNetto Date: Thu, 7 Apr 2022 14:31:42 -0700 Subject: [PATCH] tstest/integration/vms: fix docs, qemu-img invocation Signed-off-by: Tom DNetto --- tstest/integration/vms/README.md | 13 +++++-------- tstest/integration/vms/vms_test.go | 3 ++- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tstest/integration/vms/README.md b/tstest/integration/vms/README.md index 881d47ec6..762970ad2 100644 --- a/tstest/integration/vms/README.md +++ b/tstest/integration/vms/README.md @@ -26,19 +26,16 @@ This test also requires the following: - the user running these tests must have access to `/dev/kvm` (being in the `kvm` group should suffice) -This optionally requires an AWS profile to be configured at the [default -path](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html). -The S3 bucket is set so that the requester pays. Please keep this in mind when -running these tests on your machine. If you are uncomfortable with the cost from -downloading from S3, you should pass the `-no-s3` flag to disable downloads from -S3. However keep in mind that some distributions do not use stable URLs for each -individual image artifact, so there may be spurious test failures as a result. +The `-no-s3` flag is needed to disable downloads from S3, which require +credentials. However keep in mind that some distributions do not use stable URLs +for each individual image artifact, so there may be spurious test failures as a +result. If you are using [Nix](https://nixos.org), you can run all of the tests with the correct command line tools using this command: ```console -$ nix-shell -p openssh -p go -p qemu -p cdrkit --run "go test . --run-vm-tests --v --timeout 30m" +$ nix-shell -p openssh -p go -p qemu -p cdrkit --run "go test . --run-vm-tests --v --timeout 30m --no-s3" ``` Keep the timeout high for the first run, especially if you are not downloading diff --git a/tstest/integration/vms/vms_test.go b/tstest/integration/vms/vms_test.go index f0aef3e22..184e9fb47 100644 --- a/tstest/integration/vms/vms_test.go +++ b/tstest/integration/vms/vms_test.go @@ -103,7 +103,8 @@ func mkLayeredQcow(t *testing.T, tdir string, d Distro, qcowBase string) { run(t, tdir, "qemu-img", "create", "-f", "qcow2", - "-o", "backing_file="+qcowBase, + "-b", qcowBase, + "-F", "qcow2", filepath.Join(tdir, d.Name+".qcow2"), ) }