aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest
diff options
context:
space:
mode:
authorAni Sinha <anisinha@redhat.com>2023-05-04 21:16:11 +0530
committerThomas Huth <thuth@redhat.com>2023-05-16 09:14:18 +0200
commitda9000784c90d2b645eedaa865b5cf778cb4d37f (patch)
tree6cc5733968de61db6a54452647dd22d0fd166e1a /tests/qtest
parenta19b119bd79f2c4b521c5969c9ffdabd0b6b546b (diff)
tests/lcitool: Add mtools and xorriso and remove genisoimage as dependencies
Bios bits avocado tests need mformat (provided by the mtools package) and xorriso tools in order to run within gitlab CI containers. Add those dependencies within the Dockerfiles so that containers can be built with those tools present and bios bits avocado tests can be run there. xorriso package conflicts with genisoimage package on some distributions. Therefore, it is not possible to have both the packages at the same time in the container image uniformly for all distribution flavors. Further, on some distributions like RHEL, both xorriso and genisoimage packages provide /usr/bin/genisoimage and on some other distributions like Fedora, only genisoimage package provides the same utility. Therefore, this change removes the dependency on geninsoimage for building container images altogether keeping only xorriso package. At the same time, cdrom-test.c is updated to use and check for existence of only xorrisofs. Signed-off-by: Ani Sinha <anisinha@redhat.com> Message-Id: <20230504154611.85854-3-anisinha@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest')
-rw-r--r--tests/qtest/cdrom-test.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c
index 31d3bacd8c..2b7e10d920 100644
--- a/tests/qtest/cdrom-test.c
+++ b/tests/qtest/cdrom-test.c
@@ -17,7 +17,7 @@
static char isoimage[] = "cdrom-boot-iso-XXXXXX";
-static int exec_genisoimg(const char **args)
+static int exec_xorrisofs(const char **args)
{
gchar *out_err = NULL;
gint exit_status = -1;
@@ -43,7 +43,7 @@ static int prepare_image(const char *arch, char *isoimage)
char *codefile = NULL;
int ifh, ret = -1;
const char *args[] = {
- "genisoimage", "-quiet", "-l", "-no-emul-boot",
+ "xorrisofs", "-quiet", "-l", "-no-emul-boot",
"-b", NULL, "-o", isoimage, srcdir, NULL
};
@@ -75,9 +75,9 @@ static int prepare_image(const char *arch, char *isoimage)
}
args[5] = strchr(codefile, '/') + 1;
- ret = exec_genisoimg(args);
+ ret = exec_xorrisofs(args);
if (ret) {
- fprintf(stderr, "genisoimage failed: %i\n", ret);
+ fprintf(stderr, "xorrisofs failed: %i\n", ret);
}
unlink(codefile);
@@ -211,12 +211,12 @@ int main(int argc, char **argv)
{
int ret;
const char *arch = qtest_get_arch();
- const char *genisocheck[] = { "genisoimage", "-version", NULL };
+ const char *xorrisocheck[] = { "xorrisofs", "-version", NULL };
g_test_init(&argc, &argv, NULL);
- if (exec_genisoimg(genisocheck)) {
- /* genisoimage not available - so can't run tests */
+ if (exec_xorrisofs(xorrisocheck)) {
+ /* xorrisofs not available - so can't run tests */
return g_test_run();
}