27 Commits

Author SHA1 Message Date
Richard W.M. Jones
72cfaff5c5 Update copyright dates for 2025
Automated using this command:

perl -pi.bak -e 's/(20[012][0-9])-20[12][01234]/$1-2025/g' `git ls-files`
2025-02-16 17:00:46 +00:00
Richard W.M. Jones
574a87f889 test-data/binaries: Remove +x attribute
These binaries are not meant to be run, they are purely data files
used for testing.  Remove the +x attribute to prevent accidentally
running them.

However to avoid breaking the phony guests, we need to chmod +x the
files when we upload them into those guests.
2024-04-25 13:00:22 +01:00
Laszlo Ersek
58e2640233 LUKS-on-LVM inspection test: rename VGs and LVs
In preparation for a subsequent patch, rename "VG" to "Volume-Group", and
"LV<n>" to "Logical-Volume-<n>", in the LUKS-on-LVM inspection test.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2168506
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20230519140849.310774-3-lersek@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
2023-05-22 14:23:53 +02:00
Richard W.M. Jones
e2c7bddf10 Update copyright dates for 2023
Run this command across the source:

  perl -pi.bak -e 's/(20[012][0-9])-20[12][012]/$1-2023/g' `git ls-files`

and remove changes to po{,-docs}/*.po{,t} (these will be regenerated
later when we run 'make dist').
2023-02-07 10:50:48 +00:00
Laszlo Ersek
3221133140 tests: add LUKS-on-LVM test
Create a new (fake) Fedora disk image with two partitions. /dev/sda1 is
the boot partition as usual, /dev/sda2 is used as an LVM PV. The VG has
four LVs, Root and LV1 through LV3.

Each LV holds a LUKS device (with a different key). Each decrypted LUKS
device holds an ext2 filesystem, with "/dev/mapper/Root-luks" holding the
root filesystem.

Each filesystem has a dedicated label (ROOT, LV1, LV2, LV3).

In the test case, run guestfish in inspector mode, twice.

In the first invocation, provide the LUKS passphrases by LV name. Also
specific to the first invocation, fetch the LUKS UUIDs by LV name.

In the second invocation, provide the LUKS passphrases by UUID.

In both invocations, after decryption, check the filesystem labels, the
/dev/mapper/* names generated for the decrypted LUKS block devices, and
the existence of "/etc/fedora-release" on the root filesystem.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1658126
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20220223162120.16729-3-lersek@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
2022-02-28 13:12:21 +01:00
Laszlo Ersek
39a5bb6fda tests: rename "luks" to "lvm-on-luks"
Clarify that our current usage of "luks" stands for "lvm-on-luks" (IOW,
that the decrypted LUKS devices are Physical Volumes for LVM).

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1658126
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20220223162120.16729-2-lersek@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
2022-02-28 13:11:56 +01:00
Richard W.M. Jones
0b223a2877 test-data: Replace deprecated luks_open with cryptsetup_open.
The two calls are identical, so this simply avoids a deprecation
warning.
2021-05-27 17:21:16 +01:00
Richard W.M. Jones
42e5e7cfdb test-data/phony-guests: Fix phony RPM database, fix virt-inspector test.
libguestfs 1.45.3 now reads the RPM database using librpm, which means
our old phony database created by db_dump can no longer work.  Instead
provide a real (but very minimal) sqlite database.

This commit also fixes the virt-inspector test since the RPM database
contents are now different.
2021-03-29 17:26:43 +01:00
Richard W.M. Jones
0e17236d7d Update copyright dates to 2020. 2020-03-06 19:32:32 +00:00
Pino Toscano
8bbf8e8900 test-data: switch away from deprecated APIs
Adapt make-fedora-img.pl to not use deprecated APIs anymore:
- set_e2uuid -> set_uuid
- txz_in -> tar_in + compress:xz

This causes no changes in the generated test images.
2019-05-02 18:34:18 +02:00
Richard W.M. Jones
05d4fcb64d Update copyright dates for 2019.
This command run over the source:

perl -pi.bak -e 's/(20[01][0-9])-2018/$1-2019/g' `git ls-files`
2019-01-08 11:58:30 +00:00
Richard W.M. Jones
ed3ff51df9 test-data: Allow tests to be run when Btrfs is not available.
Create the fedora-btrfs.img as an empty file.

The only place this is used explicitly is tests/mountable/
test-mountable-inspect.sh, but that test already skips if !btrfs.

Also this is used via guests-all-good.xml, but the script that creates
this XML skips the file if it has zero size.
2018-11-20 15:40:10 +00:00
Richard W.M. Jones
df54c75d4c test-data: Fix indentation in make-fedora-img.pl.
Only a whitespace change.
2018-11-14 18:20:24 +00:00
Richard W.M. Jones
16e64b8988 test-data/phony-guests: Add Fedora LUKS phony image for testing.
This is not added to guests-all-good since it cannot be used in
automated tests -- a password must be supplied.
2018-07-26 12:02:59 +01:00
Richard W.M. Jones
3a87c4bb44 test-data/phony-guests: Add comment to Makefile above Fedora btrfs image.
Fixes commit 754e819438.
2018-07-18 13:15:47 +01:00
Richard W.M. Jones
212762c593 Update copyright dates for 2018.
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2017/$1-2018/g' `git ls-files`
2018-01-04 15:30:10 +00:00
Richard W.M. Jones
327caa1f08 test-data: Use another name for boot and root MD devices.
mdadm 4.0 no longer lets you create devices called literally "boot" or
"root", giving a very obscure error message:

https://bugzilla.redhat.com/show_bug.cgi?id=1433575

Work around this by calling them something else.
2017-03-18 10:24:12 +00:00
Pino Toscano
55bf7de97c Update copyright dates for 2017
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2016/$1-2017/g' `git ls-files`

(Thanks Rich for the perl snippet, as used in past years.)
2017-01-03 16:48:21 +01:00
Richard W.M. Jones
76c0a67d30 build: Add common CLEANFILES and DISTCLEANFILES to common-rules.mk.
By adding common CLEANFILES and DISTCLEANFILES variables to
common-rules.mk, we can remove these from most other Makefiles, and
also clean files more consistently.

Note that bin_PROGRAMS are already cleaned by 'make clean', so I
removed cases where these were unnecessarily added to CLEANFILES.
2016-08-25 16:54:34 +01:00
Pino Toscano
64bb9edd52 tests: specify the image format when possible
When possible, make the disk image format explicit when invoking tools
or using add-drive. This avoids warnings from qemu about the unspecified
format for the image, and also makes qemu slightly faster (skipping the
disk image probing).
Tests checking the image probing are not touched.

This changes also:
- old-style invocations of tools (`$tool $filename`) into new style
  (`$tool -a $filename`)
- add-drive-ro/add-drive-with-if guestfish commands into add/add-drive
  with explicit readonly/iface arguments

There should be no change in the tests results.
2016-05-19 19:06:00 +02:00
Pino Toscano
d2e81b42e7 inspect: use os-release for CoreOS
Look for /lib/os-release in the /usr partition and try to use it, if
present, before using lsb-release later on.  This should not change the
final result of the inspection, while using the os-release detection
method also for CoreOS.

Update the phony CoreOS image to use os-release instead, uploading the
version found in the current stable version.
2016-03-31 11:38:00 +02:00
Roman Kagan
ad5bb4f6bd v2v: collect source network and video adapter types
Those will be useful when making decisions about what configuration to
set on output.

The data is also included in --print-source so the tests are adjusted
accordingly.

Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: "Richard W.M. Jones" <rjones@redhat.com>
2016-03-24 15:07:01 +03:00
Richard W.M. Jones
307c83177c Update copyright dates for 2016.
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2015/$1-2016/g' `git ls-files`
2016-01-02 21:19:51 +00:00
Richard W.M. Jones
8a72616bf7 test-data: phony-guests: Don't use *.tmp.* temporary files. 2015-11-05 13:46:05 +00:00
Richard W.M. Jones
877c69bef7 build: Reorder build sequence.
When I conceived commit dc1d0880b0, I
thought it would be a good idea to build test-data files, including
the phony guest images, during the 'make' phase.  Previously these
were built early in the 'make check' phase.

However this has two disadvantages: (a) We run the appliance
unnecessarily during builds.  For example, it is not necessary to
build the phony guests if we are going to do an 'installcheck'.
(b) Even if we are testing, the critical first time we run the
appliance is not in 'quickcheck' or 'tests/qemu', but some random
guest build.

Reorder the build sequence to fix this, and also a few other things.

This updates commit dc1d0880b0.
2015-10-30 22:06:18 +00:00
Richard W.M. Jones
dd5f5ffb48 test-data: Remove bogus comment.
The way we now build the blank guest images is safe to be run in
parallel.
2015-10-30 21:39:54 +00:00
Richard W.M. Jones
dc1d0880b0 tests: Move the tests/data and tests/guests directories to test-data.
Create a new top-level directory called test-data, which will carry
all the test data which is large and/or shared between multiple tests.

There are actually several new subdirectories created:

test-data/binaries: The pre-built binary and library files for random
architectures that we use to test various architecture detection
features (was part of tests/data).

test-data/blank-disks: The blank disks which are used for disk format
detection (was part of tests/data).

test-data/files: Other miscellaneous test files from tests/data that
are not included in the above.

test-data/phony-guests: The phony guests (was tests/guests).

test-data: The top-level directory builds the 'test.iso' image file
that is used for testing the C API and in miscellaneous other tests.
2015-10-30 16:07:32 +00:00