mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
tests: Run the tests in parallel.
Before this change the tests ran in about 12m34 and afterwards in about 6m20, although the real change is more dramatic if you only run tests from the tests/ subdirectory (as language tests still run serially). This breaks valgrinding for now, which I intend to fix properly later.
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -428,17 +428,14 @@ Makefile.in
|
||||
/tests/c-api/test-dlopen
|
||||
/tests/c-api/test-environment
|
||||
/tests/c-api/test-event-string
|
||||
/tests/c-api/test*.img
|
||||
/tests/c-api/test-just-header
|
||||
/tests/c-api/test-just-header-cxx
|
||||
/tests/c-api/test-last-errno
|
||||
/tests/c-api/test.log
|
||||
/tests/c-api/test-private-data
|
||||
/tests/c-api/test-pwd
|
||||
/tests/c-api/tests
|
||||
/tests/c-api/tests.c
|
||||
/tests/c-api/test-threads
|
||||
/tests/c-api/test*.tmp
|
||||
/tests/c-api/test-user-cancel
|
||||
/tests/charsets/test-charset-fidelity
|
||||
/tests/daemon/captive-daemon.pm
|
||||
@@ -452,12 +449,9 @@ Makefile.in
|
||||
/tests/regressions/rhbz501893
|
||||
/tests/regressions/rhbz790721
|
||||
/tests/regressions/rhbz914931
|
||||
/tests/regressions/rhbz1044014.out
|
||||
/tests/regressions/rhbz1055452
|
||||
/tests/regressions/test-big-heap
|
||||
/tests/rsync/rsyncd.pid
|
||||
/tests/syslinux/extlinux-guest.img
|
||||
/tests/syslinux/syslinux-guest.img
|
||||
/tests/testdownload.tmp
|
||||
/test-data/test.iso
|
||||
/test-data/blank-disks/blank-disk-*
|
||||
/test-data/fake-virtio-win/fake-virtio-win.iso
|
||||
|
||||
48
Makefile.am
48
Makefile.am
@@ -22,13 +22,8 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
# The generator - must be before anything else.
|
||||
SUBDIRS = common/mlstdutils generator
|
||||
|
||||
# Must be the first tests that run.
|
||||
if ENABLE_APPLIANCE
|
||||
SUBDIRS += tests/qemu
|
||||
endif
|
||||
|
||||
# Files and other test data used by the tests. Must be before any
|
||||
# tests run, except tests/qemu.
|
||||
# tests run.
|
||||
SUBDIRS += test-data
|
||||
|
||||
# Gnulib - must be built and tested before the library.
|
||||
@@ -50,50 +45,13 @@ SUBDIRS += common/mlpcre
|
||||
SUBDIRS += common/mlgettext
|
||||
if ENABLE_DAEMON
|
||||
SUBDIRS += daemon
|
||||
SUBDIRS += tests/daemon
|
||||
endif
|
||||
if ENABLE_APPLIANCE
|
||||
SUBDIRS += appliance
|
||||
endif
|
||||
|
||||
# Tests - order is important.
|
||||
if ENABLE_APPLIANCE
|
||||
SUBDIRS += tests/c-api
|
||||
SUBDIRS += tests/tmpdirs
|
||||
SUBDIRS += tests/protocol
|
||||
SUBDIRS += tests/events
|
||||
SUBDIRS += tests/parallel
|
||||
SUBDIRS += tests/create
|
||||
SUBDIRS += tests/disks
|
||||
SUBDIRS += tests/discard
|
||||
SUBDIRS += tests/mountable
|
||||
SUBDIRS += tests/network
|
||||
SUBDIRS += tests/lvm
|
||||
SUBDIRS += tests/luks
|
||||
SUBDIRS += tests/md
|
||||
SUBDIRS += tests/selinux
|
||||
SUBDIRS += tests/relabel
|
||||
SUBDIRS += tests/ntfs
|
||||
SUBDIRS += tests/btrfs
|
||||
SUBDIRS += tests/xfs
|
||||
SUBDIRS += tests/charsets
|
||||
SUBDIRS += tests/xml
|
||||
SUBDIRS += tests/mount-local
|
||||
SUBDIRS += tests/9p
|
||||
SUBDIRS += tests/rsync
|
||||
SUBDIRS += tests/bigdirs
|
||||
SUBDIRS += tests/disk-labels
|
||||
SUBDIRS += tests/hotplug
|
||||
SUBDIRS += tests/nbd
|
||||
SUBDIRS += tests/http
|
||||
SUBDIRS += tests/syslinux
|
||||
SUBDIRS += tests/journal
|
||||
SUBDIRS += tests/relative-paths
|
||||
SUBDIRS += tests/gdisk
|
||||
SUBDIRS += tests/regressions
|
||||
SUBDIRS += tests/tsk
|
||||
SUBDIRS += tests/yara
|
||||
endif
|
||||
# Tests.
|
||||
SUBDIRS += tests
|
||||
|
||||
# Common code used by the tools.
|
||||
SUBDIRS += common/edit
|
||||
|
||||
38
configure.ac
38
configure.ac
@@ -285,45 +285,9 @@ AC_CONFIG_FILES([Makefile
|
||||
test-data/phony-guests/Makefile
|
||||
test-data/phony-guests/guests.xml
|
||||
test-tool/Makefile
|
||||
tests/9p/Makefile
|
||||
tests/bigdirs/Makefile
|
||||
tests/btrfs/Makefile
|
||||
tests/c-api/Makefile
|
||||
tests/charsets/Makefile
|
||||
tests/create/Makefile
|
||||
tests/daemon/Makefile
|
||||
tests/Makefile
|
||||
tests/daemon/captive-daemon.pm
|
||||
tests/discard/Makefile
|
||||
tests/disks/Makefile
|
||||
tests/disks/test-qemu-drive-libvirt.xml
|
||||
tests/disk-labels/Makefile
|
||||
tests/events/Makefile
|
||||
tests/gdisk/Makefile
|
||||
tests/hotplug/Makefile
|
||||
tests/http/Makefile
|
||||
tests/journal/Makefile
|
||||
tests/luks/Makefile
|
||||
tests/lvm/Makefile
|
||||
tests/md/Makefile
|
||||
tests/mount-local/Makefile
|
||||
tests/mountable/Makefile
|
||||
tests/nbd/Makefile
|
||||
tests/network/Makefile
|
||||
tests/ntfs/Makefile
|
||||
tests/parallel/Makefile
|
||||
tests/protocol/Makefile
|
||||
tests/qemu/Makefile
|
||||
tests/regressions/Makefile
|
||||
tests/relabel/Makefile
|
||||
tests/relative-paths/Makefile
|
||||
tests/rsync/Makefile
|
||||
tests/selinux/Makefile
|
||||
tests/syslinux/Makefile
|
||||
tests/tmpdirs/Makefile
|
||||
tests/tsk/Makefile
|
||||
tests/xfs/Makefile
|
||||
tests/xml/Makefile
|
||||
tests/yara/Makefile
|
||||
website/index.html])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -1048,19 +1048,19 @@ hidden files are shown." };
|
||||
style = RString (RPlainString, "format"), [String (PlainString, "filename")], [];
|
||||
tests = [
|
||||
InitEmpty, Always, TestResultString (
|
||||
[["disk_format"; "../../test-data/blank-disks/blank-disk-1s.raw"]], "raw"), [];
|
||||
[["disk_format"; "../test-data/blank-disks/blank-disk-1s.raw"]], "raw"), [];
|
||||
InitEmpty, Always, TestResultString (
|
||||
[["disk_format"; "../../test-data/blank-disks/blank-disk-1s.qcow2"]], "qcow2"), [];
|
||||
[["disk_format"; "../test-data/blank-disks/blank-disk-1s.qcow2"]], "qcow2"), [];
|
||||
InitEmpty, Always, TestResultString (
|
||||
[["disk_format"; "../../test-data/blank-disks/blank-disk-1K.raw"]], "raw"), [];
|
||||
[["disk_format"; "../test-data/blank-disks/blank-disk-1K.raw"]], "raw"), [];
|
||||
InitEmpty, Always, TestResultString (
|
||||
[["disk_format"; "../../test-data/blank-disks/blank-disk-1K.qcow2"]], "qcow2"), [];
|
||||
[["disk_format"; "../test-data/blank-disks/blank-disk-1K.qcow2"]], "qcow2"), [];
|
||||
InitEmpty, Always, TestResultString (
|
||||
[["disk_format"; "../../test-data/blank-disks/blank-disk-1M.raw"]], "raw"), [];
|
||||
[["disk_format"; "../test-data/blank-disks/blank-disk-1M.raw"]], "raw"), [];
|
||||
InitEmpty, Always, TestResultString (
|
||||
[["disk_format"; "../../test-data/blank-disks/blank-disk-1M.qcow2"]], "qcow2"), [];
|
||||
[["disk_format"; "../test-data/blank-disks/blank-disk-1M.qcow2"]], "qcow2"), [];
|
||||
InitEmpty, Always, TestResultString (
|
||||
[["disk_format"; "../../test-data/blank-disks/blank-disk-with-backing.qcow2"]], "qcow2"), [];
|
||||
[["disk_format"; "../test-data/blank-disks/blank-disk-with-backing.qcow2"]], "qcow2"), [];
|
||||
];
|
||||
shortdesc = "detect the disk format of a disk image";
|
||||
longdesc = "\
|
||||
@@ -1078,19 +1078,19 @@ See also: L<guestfs(3)/DISK IMAGE FORMATS>" };
|
||||
style = RInt64 "size", [String (PlainString, "filename")], [];
|
||||
tests = [
|
||||
InitEmpty, Always, TestResult (
|
||||
[["disk_virtual_size"; "../../test-data/blank-disks/blank-disk-1s.raw"]], "ret == 512"), [];
|
||||
[["disk_virtual_size"; "../test-data/blank-disks/blank-disk-1s.raw"]], "ret == 512"), [];
|
||||
InitEmpty, Always, TestResult (
|
||||
[["disk_virtual_size"; "../../test-data/blank-disks/blank-disk-1s.qcow2"]], "ret == 512"), [];
|
||||
[["disk_virtual_size"; "../test-data/blank-disks/blank-disk-1s.qcow2"]], "ret == 512"), [];
|
||||
InitEmpty, Always, TestResult (
|
||||
[["disk_virtual_size"; "../../test-data/blank-disks/blank-disk-1K.raw"]], "ret == 1024"), [];
|
||||
[["disk_virtual_size"; "../test-data/blank-disks/blank-disk-1K.raw"]], "ret == 1024"), [];
|
||||
InitEmpty, Always, TestResult (
|
||||
[["disk_virtual_size"; "../../test-data/blank-disks/blank-disk-1K.qcow2"]], "ret == 1024"), [];
|
||||
[["disk_virtual_size"; "../test-data/blank-disks/blank-disk-1K.qcow2"]], "ret == 1024"), [];
|
||||
InitEmpty, Always, TestResult (
|
||||
[["disk_virtual_size"; "../../test-data/blank-disks/blank-disk-1M.raw"]], "ret == 1024*1024"), [];
|
||||
[["disk_virtual_size"; "../test-data/blank-disks/blank-disk-1M.raw"]], "ret == 1024*1024"), [];
|
||||
InitEmpty, Always, TestResult (
|
||||
[["disk_virtual_size"; "../../test-data/blank-disks/blank-disk-1M.qcow2"]], "ret == 1024*1024"), [];
|
||||
[["disk_virtual_size"; "../test-data/blank-disks/blank-disk-1M.qcow2"]], "ret == 1024*1024"), [];
|
||||
InitEmpty, Always, TestResult (
|
||||
[["disk_virtual_size"; "../../test-data/blank-disks/blank-disk-with-backing.qcow2"]], "ret == 1024*1024"), [];
|
||||
[["disk_virtual_size"; "../test-data/blank-disks/blank-disk-with-backing.qcow2"]], "ret == 1024*1024"), [];
|
||||
];
|
||||
shortdesc = "return virtual size of a disk";
|
||||
longdesc = "\
|
||||
@@ -1105,19 +1105,19 @@ circumstances. See L<guestfs(3)/CVE-2010-3851>." };
|
||||
style = RBool "backingfile", [String (PlainString, "filename")], [];
|
||||
tests = [
|
||||
InitEmpty, Always, TestResultFalse (
|
||||
[["disk_has_backing_file"; "../../test-data/blank-disks/blank-disk-1s.raw"]]), [];
|
||||
[["disk_has_backing_file"; "../test-data/blank-disks/blank-disk-1s.raw"]]), [];
|
||||
InitEmpty, Always, TestResultFalse (
|
||||
[["disk_has_backing_file"; "../../test-data/blank-disks/blank-disk-1s.qcow2"]]), [];
|
||||
[["disk_has_backing_file"; "../test-data/blank-disks/blank-disk-1s.qcow2"]]), [];
|
||||
InitEmpty, Always, TestResultFalse (
|
||||
[["disk_has_backing_file"; "../../test-data/blank-disks/blank-disk-1K.raw"]]), [];
|
||||
[["disk_has_backing_file"; "../test-data/blank-disks/blank-disk-1K.raw"]]), [];
|
||||
InitEmpty, Always, TestResultFalse (
|
||||
[["disk_has_backing_file"; "../../test-data/blank-disks/blank-disk-1K.qcow2"]]), [];
|
||||
[["disk_has_backing_file"; "../test-data/blank-disks/blank-disk-1K.qcow2"]]), [];
|
||||
InitEmpty, Always, TestResultFalse (
|
||||
[["disk_has_backing_file"; "../../test-data/blank-disks/blank-disk-1M.raw"]]), [];
|
||||
[["disk_has_backing_file"; "../test-data/blank-disks/blank-disk-1M.raw"]]), [];
|
||||
InitEmpty, Always, TestResultFalse (
|
||||
[["disk_has_backing_file"; "../../test-data/blank-disks/blank-disk-1M.qcow2"]]), [];
|
||||
[["disk_has_backing_file"; "../test-data/blank-disks/blank-disk-1M.qcow2"]]), [];
|
||||
InitEmpty, Always, TestResultTrue (
|
||||
[["disk_has_backing_file"; "../../test-data/blank-disks/blank-disk-with-backing.qcow2"]]), [];
|
||||
[["disk_has_backing_file"; "../test-data/blank-disks/blank-disk-with-backing.qcow2"]]), [];
|
||||
];
|
||||
shortdesc = "return whether disk has a backing file";
|
||||
longdesc = "\
|
||||
@@ -2532,7 +2532,7 @@ This uses the L<blockdev(8)> command." };
|
||||
InitScratchFS, Always, TestResultString (
|
||||
(* Pick a file from cwd which isn't likely to change. *)
|
||||
[["mkdir"; "/upload"];
|
||||
["upload"; "$srcdir/../../COPYING.LIB"; "/upload/COPYING.LIB"];
|
||||
["upload"; "$srcdir/../COPYING.LIB"; "/upload/COPYING.LIB"];
|
||||
["checksum"; "md5"; "/upload/COPYING.LIB"]],
|
||||
Digest.to_hex (Digest.file "COPYING.LIB")), []
|
||||
];
|
||||
@@ -2553,7 +2553,7 @@ See also C<guestfs_download>." };
|
||||
InitScratchFS, Always, TestResultString (
|
||||
(* Pick a file from cwd which isn't likely to change. *)
|
||||
[["mkdir"; "/download"];
|
||||
["upload"; "$srcdir/../../COPYING.LIB"; "/download/COPYING.LIB"];
|
||||
["upload"; "$srcdir/../COPYING.LIB"; "/download/COPYING.LIB"];
|
||||
["download"; "/download/COPYING.LIB"; "testdownload.tmp"];
|
||||
["upload"; "testdownload.tmp"; "/download/upload"];
|
||||
["checksum"; "md5"; "/download/upload"]],
|
||||
@@ -2647,15 +2647,15 @@ To get the checksums for many files, use C<guestfs_checksums_out>." };
|
||||
tests = [
|
||||
InitScratchFS, Always, TestResultString (
|
||||
[["mkdir"; "/tar_in"];
|
||||
["tar_in"; "$srcdir/../../test-data/files/helloworld.tar"; "/tar_in"; "NOARG"; ""; ""; ""];
|
||||
["tar_in"; "$srcdir/../test-data/files/helloworld.tar"; "/tar_in"; "NOARG"; ""; ""; ""];
|
||||
["cat"; "/tar_in/hello"]], "hello\n"), [];
|
||||
InitScratchFS, Always, TestResultString (
|
||||
[["mkdir"; "/tar_in_gz"];
|
||||
["tar_in"; "$srcdir/../../test-data/files/helloworld.tar.gz"; "/tar_in_gz"; "gzip"; ""; ""; ""];
|
||||
["tar_in"; "$srcdir/../test-data/files/helloworld.tar.gz"; "/tar_in_gz"; "gzip"; ""; ""; ""];
|
||||
["cat"; "/tar_in_gz/hello"]], "hello\n"), [];
|
||||
InitScratchFS, IfAvailable "xz", TestResultString (
|
||||
[["mkdir"; "/tar_in_xz"];
|
||||
["tar_in"; "$srcdir/../../test-data/files/helloworld.tar.xz"; "/tar_in_xz"; "xz"; ""; ""; ""];
|
||||
["tar_in"; "$srcdir/../test-data/files/helloworld.tar.xz"; "/tar_in_xz"; "xz"; ""; ""; ""];
|
||||
["cat"; "/tar_in_xz/hello"]], "hello\n"), []
|
||||
];
|
||||
shortdesc = "unpack tarfile to directory";
|
||||
@@ -5356,7 +5356,7 @@ types (see C<guestfs_part_get_parttype>)." };
|
||||
tests = [
|
||||
InitISOFS, Always, TestResult (
|
||||
[["checksum_device"; "md5"; "/dev/sdd"]],
|
||||
"check_file_md5 (ret, \"../../test-data/test.iso\") == 0"), []
|
||||
"check_file_md5 (ret, \"../test-data/test.iso\") == 0"), []
|
||||
];
|
||||
shortdesc = "compute MD5, SHAx or CRC checksum of the contents of a device";
|
||||
longdesc = "\
|
||||
@@ -5403,7 +5403,7 @@ unless it has been set by calling C<guestfs_umask>." };
|
||||
cancellable = true;
|
||||
tests = [
|
||||
InitScratchFS, Always, TestResultString (
|
||||
[["base64_in"; "../../test-data/files/hello.b64"; "/base64_in"];
|
||||
[["base64_in"; "../test-data/files/hello.b64"; "/base64_in"];
|
||||
["cat"; "/base64_in"]], "hello\n"), []
|
||||
];
|
||||
shortdesc = "upload base64-encoded data to file";
|
||||
@@ -5882,7 +5882,7 @@ See also C<guestfs_part_to_partnum>, C<guestfs_device_index>." };
|
||||
tests =
|
||||
(let md5 = Digest.to_hex (Digest.file "COPYING.LIB") in [
|
||||
InitScratchFS, Always, TestResultString (
|
||||
[["upload_offset"; "$srcdir/../../COPYING.LIB"; "/upload_offset"; "0"];
|
||||
[["upload_offset"; "$srcdir/../COPYING.LIB"; "/upload_offset"; "0"];
|
||||
["checksum"; "md5"; "/upload_offset"]], md5), []
|
||||
]);
|
||||
shortdesc = "upload a file from the local machine with offset";
|
||||
@@ -5916,7 +5916,7 @@ See also C<guestfs_upload>, C<guestfs_pwrite>." };
|
||||
InitScratchFS, Always, TestResultString (
|
||||
(* Pick a file from cwd which isn't likely to change. *)
|
||||
[["mkdir"; "/download_offset"];
|
||||
["upload"; "$srcdir/../../COPYING.LIB"; "/download_offset/COPYING.LIB"];
|
||||
["upload"; "$srcdir/../COPYING.LIB"; "/download_offset/COPYING.LIB"];
|
||||
["download_offset"; "/download_offset/COPYING.LIB"; "testdownload.tmp"; offset; size];
|
||||
["upload_offset"; "testdownload.tmp"; "/download_offset/COPYING.LIB"; offset];
|
||||
["checksum"; "md5"; "/download_offset/COPYING.LIB"]], md5), []
|
||||
|
||||
@@ -191,7 +191,7 @@ C<blocksize> option of C<guestfs_mkfs>." };
|
||||
tests = [
|
||||
InitScratchFS, Always, TestResultString (
|
||||
[["mkdir"; "/tgz_in"];
|
||||
["tgz_in"; "$srcdir/../../test-data/files/helloworld.tar.gz"; "/tgz_in"];
|
||||
["tgz_in"; "$srcdir/../test-data/files/helloworld.tar.gz"; "/tgz_in"];
|
||||
["cat"; "/tgz_in/hello"]], "hello\n"), []
|
||||
];
|
||||
shortdesc = "unpack compressed tarball to directory";
|
||||
@@ -754,7 +754,7 @@ This command cannot do partial copies
|
||||
tests = [
|
||||
InitScratchFS, Always, TestResultString (
|
||||
[["mkdir"; "/txz_in"];
|
||||
["txz_in"; "$srcdir/../../test-data/files/helloworld.tar.xz"; "/txz_in"];
|
||||
["txz_in"; "$srcdir/../test-data/files/helloworld.tar.xz"; "/txz_in"];
|
||||
["cat"; "/txz_in/hello"]], "hello\n"), []
|
||||
];
|
||||
shortdesc = "unpack compressed tarball to directory";
|
||||
|
||||
@@ -29,7 +29,7 @@ let daemon_functions = [
|
||||
optional = Some "hivex";
|
||||
tests = [
|
||||
InitScratchFS, Always, TestRun (
|
||||
[["upload"; "$srcdir/../../test-data/files/minimal"; "/hivex_open"];
|
||||
[["upload"; "$srcdir/../test-data/files/minimal"; "/hivex_open"];
|
||||
["hivex_open"; "/hivex_open"; ""; ""; "false"; ""];
|
||||
["hivex_root"]; (* in this hive, it returns 0x1020 *)
|
||||
["hivex_node_name"; "0x1020"];
|
||||
@@ -181,11 +181,11 @@ data." };
|
||||
optional = Some "hivex";
|
||||
tests = [
|
||||
InitScratchFS, Always, TestRun (
|
||||
[["upload"; "$srcdir/../../test-data/files/minimal"; "/hivex_commit1"];
|
||||
[["upload"; "$srcdir/../test-data/files/minimal"; "/hivex_commit1"];
|
||||
["hivex_open"; "/hivex_commit1"; ""; ""; "true"; ""];
|
||||
["hivex_commit"; "NULL"]]), [["hivex_close"]];
|
||||
InitScratchFS, Always, TestResultTrue (
|
||||
[["upload"; "$srcdir/../../test-data/files/minimal"; "/hivex_commit2"];
|
||||
[["upload"; "$srcdir/../test-data/files/minimal"; "/hivex_commit2"];
|
||||
["hivex_open"; "/hivex_commit2"; ""; ""; "true"; ""];
|
||||
["hivex_commit"; "/hivex_commit2_copy"];
|
||||
["is_file"; "/hivex_commit2_copy"; "false"]]), [["hivex_close"]]
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2009-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
EXTRA_DIST = $(TESTS)
|
||||
|
||||
TESTS = test-9p.sh
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(top_builddir)/run --test
|
||||
879
tests/Makefile.am
Normal file
879
tests/Makefile.am
Normal file
@@ -0,0 +1,879 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2009-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
EXTRA_DIST =
|
||||
|
||||
generator_built = c-api/tests.c
|
||||
|
||||
BUILT_SOURCES = $(generator_built)
|
||||
|
||||
TESTS = $(SLOW_TESTS)
|
||||
SLOW_TESTS =
|
||||
check_PROGRAMS =
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
SKIP_TEST_COMMAND=$(shell ldd c-api/test-command |& grep -sq 'not a dynamic executable' || echo 1) \
|
||||
SKIP_TEST_COMMAND_LINES=$(shell ldd c-api/test-command |& grep -sq 'not a dynamic executable' || echo 1) \
|
||||
SKIP_TEST_COMMAND=$(shell ldd c-api/test-pwd |& grep -sq 'not a dynamic executable' || echo 1) \
|
||||
NOEXEC_CHECK="$(top_builddir)/lib/.libs/libguestfs.so $(top_builddir)/daemon/guestfsd" \
|
||||
$(top_builddir)/run --test
|
||||
#SKIP_TEST_CHECKSUM_8=$(shell if test `find ../initramfs -name squashfs.ko | wc -l` -eq 0; then echo 1; fi)
|
||||
# XXX Only for C programs somehow.
|
||||
#LOG_COMPILER = $(VG)
|
||||
|
||||
check-slow:
|
||||
$(MAKE) check TESTS="$(SLOW_TESTS)" SLOW=1
|
||||
|
||||
check-valgrind:
|
||||
$(MAKE) VG="@VG@" check
|
||||
|
||||
TESTS += 9p/test-9p.sh
|
||||
EXTRA_DIST += 9p/test-9p.sh
|
||||
|
||||
SLOW_TESTS += bigdirs/test-big-dirs.pl
|
||||
|
||||
TESTS += \
|
||||
btrfs/test-btrfs-misc.pl \
|
||||
btrfs/test-btrfs-devices.sh \
|
||||
btrfs/test-btrfs-subvolume-default.pl \
|
||||
btrfs/test-btrfs-replace.sh
|
||||
EXTRA_DIST += \
|
||||
btrfs/test-btrfs-misc.pl \
|
||||
btrfs/test-btrfs-devices.sh \
|
||||
btrfs/test-btrfs-subvolume-default.pl \
|
||||
btrfs/test-btrfs-replace.sh
|
||||
|
||||
CLEANFILES += \
|
||||
c-api/test.log \
|
||||
c-api/testdownload.tmp
|
||||
|
||||
check_PROGRAMS += \
|
||||
c-api/tests \
|
||||
c-api/test-command \
|
||||
c-api/test-just-header \
|
||||
c-api/test-create-handle \
|
||||
c-api/test-config \
|
||||
c-api/test-add-drive-opts \
|
||||
c-api/test-last-errno \
|
||||
c-api/test-backend-settings \
|
||||
c-api/test-private-data \
|
||||
c-api/test-user-cancel \
|
||||
c-api/test-debug-to-file \
|
||||
c-api/test-environment \
|
||||
c-api/test-pwd \
|
||||
c-api/test-event-string \
|
||||
c-api/test-threads
|
||||
if HAVE_LIBDL
|
||||
check_PROGRAMS += \
|
||||
c-api/test-dlopen
|
||||
endif
|
||||
|
||||
TESTS += \
|
||||
c-api/tests \
|
||||
c-api/test-just-header \
|
||||
c-api/test-create-handle \
|
||||
c-api/test-config \
|
||||
c-api/test-add-drive-opts \
|
||||
c-api/test-last-errno \
|
||||
c-api/test-backend-settings \
|
||||
c-api/test-private-data \
|
||||
c-api/test-user-cancel \
|
||||
c-api/test-debug-to-file \
|
||||
c-api/test-environment \
|
||||
c-api/test-event-string \
|
||||
c-api/test-threads
|
||||
if HAVE_LIBDL
|
||||
TESTS += \
|
||||
c-api/test-dlopen
|
||||
endif
|
||||
|
||||
if HAVE_CXX
|
||||
check_PROGRAMS += c-api/test-just-header-cxx
|
||||
TESTS += c-api/test-just-header-cxx
|
||||
endif
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
check_PROGRAMS += c-api/test-add-libvirt-dom
|
||||
TESTS += c-api/test-add-libvirt-dom
|
||||
endif
|
||||
EXTRA_DIST += c-api/test-add-libvirt-dom.c
|
||||
|
||||
c_api_tests_SOURCES = \
|
||||
c-api/tests.c \
|
||||
c-api/tests.h \
|
||||
c-api/tests-main.c
|
||||
c_api_tests_CPPFLAGS = \
|
||||
-DGUESTFS_PRIVATE=1 \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
c_api_tests_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
$(PCRE2_CFLAGS)
|
||||
c_api_tests_LDADD = \
|
||||
$(PCRE2_LIBS) \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
$(LIBVIRT_LIBS) \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
# This binary must be statically linked. It is used for testing
|
||||
# the "guestfs_command" and "guestfs_command_lines" functions.
|
||||
|
||||
c_api_test_command_SOURCES = c-api/test-command.c
|
||||
c_api_test_command_LDFLAGS = -all-static
|
||||
|
||||
c_api_test_pwd_SOURCES = c-api/test-pwd.c
|
||||
c_api_test_pwd_LDFLAGS = -all-static
|
||||
|
||||
# Hand-written C API tests.
|
||||
|
||||
c_api_test_just_header_SOURCES = c-api/test-just-header.c
|
||||
c_api_test_just_header_CPPFLAGS = -I$(top_srcdir)/include
|
||||
c_api_test_just_header_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_just_header_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
if HAVE_CXX
|
||||
c_api_test_just_header_cxx_SOURCES = c-api/test-just-header-cxx.cpp
|
||||
c_api_test_just_header_cxx_CPPFLAGS = -I$(top_srcdir)/include
|
||||
c_api_test_just_header_cxx_CXXFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_just_header_cxx_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
endif
|
||||
|
||||
c_api_test_create_handle_SOURCES = c-api/test-create-handle.c
|
||||
c_api_test_create_handle_CPPFLAGS = -I$(top_srcdir)/include
|
||||
c_api_test_create_handle_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_create_handle_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
if HAVE_LIBDL
|
||||
c_api_test_dlopen_SOURCES = c-api/test-dlopen.c
|
||||
c_api_test_dlopen_CPPFLAGS = -I$(top_srcdir)/include
|
||||
c_api_test_dlopen_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
-DLIBRARY=\"$(top_builddir)/lib/.libs/libguestfs.so.0\"
|
||||
c_api_test_dlopen_LDADD = \
|
||||
-ldl
|
||||
endif
|
||||
|
||||
c_api_test_config_SOURCES = c-api/test-config.c
|
||||
c_api_test_config_CPPFLAGS = -I$(top_srcdir)/include
|
||||
c_api_test_config_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_config_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
c_api_test_add_drive_opts_SOURCES = c-api/test-add-drive-opts.c
|
||||
c_api_test_add_drive_opts_CPPFLAGS = -I$(top_srcdir)/include
|
||||
c_api_test_add_drive_opts_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_add_drive_opts_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
c_api_test_last_errno_SOURCES = c-api/test-last-errno.c
|
||||
c_api_test_last_errno_CPPFLAGS = -I$(top_srcdir)/include
|
||||
c_api_test_last_errno_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_last_errno_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
c_api_test_backend_settings_SOURCES = c-api/test-backend-settings.c
|
||||
c_api_test_backend_settings_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
c_api_test_backend_settings_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_backend_settings_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
c_api_test_private_data_SOURCES = c-api/test-private-data.c
|
||||
c_api_test_private_data_CPPFLAGS = -I$(top_srcdir)/include
|
||||
c_api_test_private_data_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_private_data_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
c_api_test_user_cancel_SOURCES = c-api/test-user-cancel.c
|
||||
c_api_test_user_cancel_CPPFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
c_api_test_user_cancel_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_user_cancel_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la -lm \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
c_api_test_debug_to_file_SOURCES = c-api/test-debug-to-file.c
|
||||
c_api_test_debug_to_file_CPPFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib
|
||||
c_api_test_debug_to_file_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_debug_to_file_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
c_api_test_environment_SOURCES = c-api/test-environment.c
|
||||
c_api_test_environment_CPPFLAGS = -I$(top_srcdir)/include
|
||||
c_api_test_environment_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_environment_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
c_api_test_event_string_SOURCES = c-api/test-event-string.c
|
||||
c_api_test_event_string_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/gnulib/lib \
|
||||
-I$(top_builddir)/gnulib/lib
|
||||
c_api_test_event_string_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_event_string_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
c_api_test_threads_SOURCES = c-api/test-threads.c
|
||||
c_api_test_threads_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/gnulib/lib \
|
||||
-I$(top_builddir)/gnulib/lib
|
||||
c_api_test_threads_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_threads_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LTLIBTHREAD) \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
c_api_test_add_libvirt_dom_SOURCES = c-api/test-add-libvirt-dom.c
|
||||
c_api_test_add_libvirt_dom_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/gnulib/lib \
|
||||
-I$(top_builddir)/gnulib/lib
|
||||
c_api_test_add_libvirt_dom_CFLAGS = \
|
||||
$(LIBVIRT_CFLAGS) \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
c_api_test_add_libvirt_dom_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la $(LIBVIRT_LIBS) \
|
||||
$(LTLIBINTL) \
|
||||
$(LTLIBTHREAD) $(top_builddir)/gnulib/lib/libgnu.la
|
||||
endif
|
||||
|
||||
TESTS += charsets/test-charset-fidelity
|
||||
|
||||
check_PROGRAMS += charsets/test-charset-fidelity
|
||||
|
||||
charsets_test_charset_fidelity_SOURCES = charsets/test-charset-fidelity.c
|
||||
charsets_test_charset_fidelity_CPPFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
charsets_test_charset_fidelity_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
charsets_test_charset_fidelity_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
$(LIBVIRT_LIBS) \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
TESTS += create/test-disk-create.sh
|
||||
EXTRA_DIST += create/test-disk-create.sh
|
||||
|
||||
check_DATA = daemon/captive-daemon.pm
|
||||
|
||||
TESTS += \
|
||||
daemon/test-daemon-start.pl \
|
||||
daemon/test-btrfs.pl
|
||||
EXTRA_DIST += \
|
||||
daemon/test-daemon-start.pl \
|
||||
daemon/test-btrfs.pl
|
||||
|
||||
TESTS += \
|
||||
discard/test-blkdiscard.pl \
|
||||
discard/test-discard.pl \
|
||||
discard/test-fstrim.pl
|
||||
EXTRA_DIST += \
|
||||
discard/test-blkdiscard.pl \
|
||||
discard/test-discard.pl \
|
||||
discard/test-fstrim.pl
|
||||
|
||||
TESTS += disk-labels/test-disk-labels.pl
|
||||
EXTRA_DIST += disk-labels/test-disk-labels.pl
|
||||
|
||||
TESTS += disks/test-qemu-drive.sh
|
||||
EXTRA_DIST += disks/test-qemu-drive.sh
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
TESTS += \
|
||||
disks/test-qemu-drive-libvirt.sh \
|
||||
disks/test-qemu-drive-with-blocksize-libvirt.sh
|
||||
EXTRA_DIST += \
|
||||
disks/test-qemu-drive-libvirt.sh \
|
||||
disks/test-qemu-drive-with-blocksize-libvirt.sh
|
||||
|
||||
if ENABLE_APPLIANCE
|
||||
TESTS += \
|
||||
disks/test-27-disks.sh \
|
||||
disks/test-255-disks.sh \
|
||||
disks/test-add-lots-of-disks.sh \
|
||||
disks/test-add-drive-with-blocksize.sh
|
||||
EXTRA_DIST += \
|
||||
disks/test-27-disks.sh \
|
||||
disks/test-255-disks.sh \
|
||||
disks/test-add-lots-of-disks.sh \
|
||||
disks/test-add-drive-with-blocksize.sh
|
||||
endif
|
||||
endif
|
||||
|
||||
SLOW_TESTS += disks/test-max-disks.sh
|
||||
EXTRA_DIST += disks/test-max-disks.sh
|
||||
|
||||
check_PROGRAMS += disks/test-add-disks
|
||||
|
||||
disks_test_add_disks_SOURCES = \
|
||||
disks/test-add-disks.c
|
||||
disks_test_add_disks_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib
|
||||
disks_test_add_disks_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
disks_test_add_disks_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la \
|
||||
$(LIBXML2_LIBS)
|
||||
|
||||
EXTRA_DIST += disks/debug-qemu.sh
|
||||
|
||||
EXTRA_DIST += \
|
||||
events/test-console-debug.pl \
|
||||
events/libvirt-auth.xml
|
||||
|
||||
TESTS += events/test-console-debug.pl
|
||||
EXTRA_DIST += events/test-console-debug.pl
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
TESTS += events/test-libvirt-auth-callbacks
|
||||
check_PROGRAMS += events/test-libvirt-auth-callbacks
|
||||
|
||||
events_test_libvirt_auth_callbacks_SOURCES = \
|
||||
events/test-libvirt-auth-callbacks.c
|
||||
events_test_libvirt_auth_callbacks_CPPFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
events_test_libvirt_auth_callbacks_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
$(LIBVIRT_CFLAGS)
|
||||
events_test_libvirt_auth_callbacks_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBVIRT_LIBS) \
|
||||
$(LIBXML2_LIBS) \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
endif
|
||||
|
||||
TESTS += gdisk/test-expand-gpt.pl
|
||||
EXTRA_DIST += gdisk/test-expand-gpt.pl
|
||||
|
||||
TESTS += \
|
||||
hotplug/test-hot-add.pl \
|
||||
hotplug/test-hot-remove.pl
|
||||
EXTRA_DIST += \
|
||||
hotplug/test-hot-add.pl \
|
||||
hotplug/test-hot-remove.pl \
|
||||
hotplug/test-hotplug-repeated.pl
|
||||
|
||||
# Test uses the Python SimpleHTTPServer module which is
|
||||
# conveniently part of Python core.
|
||||
|
||||
if HAVE_PYTHON
|
||||
|
||||
# Test disabled for now. Several things conspire to stop this working:
|
||||
#
|
||||
# (1) Python may throw "Broken pipe" errors:
|
||||
# http://bugs.python.org/issue14574
|
||||
# Fixed upstream in Python >= 2.7.5.
|
||||
#
|
||||
# (2) Fedora 18's Curl is broken. Can be resolved by compiling Curl
|
||||
# from git and setting LD_LIBRARY_PATH=~/curl/lib/.libs
|
||||
|
||||
# TESTS = test-http.py
|
||||
#
|
||||
# TESTS_ENVIRONMENT = $(top_builddir)/run --test $(PYTHON)
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST += http/test-http.py
|
||||
|
||||
TESTS += journal/test-journal.pl
|
||||
EXTRA_DIST += journal/test-journal.pl
|
||||
|
||||
TESTS += \
|
||||
luks/test-luks.sh \
|
||||
luks/test-luks-list.sh \
|
||||
luks/test-key-option.sh \
|
||||
luks/test-key-option-inspect.sh
|
||||
EXTRA_DIST += \
|
||||
luks/test-luks.sh \
|
||||
luks/test-luks-list.sh \
|
||||
luks/test-key-option.sh \
|
||||
luks/test-key-option-inspect.sh
|
||||
|
||||
TESTS += \
|
||||
lvm/test-lvm-filtering.sh \
|
||||
lvm/test-lvm-mapping.pl
|
||||
EXTRA_DIST += \
|
||||
lvm/test-lvm-filtering.sh \
|
||||
lvm/test-lvm-mapping.pl
|
||||
|
||||
TESTS += \
|
||||
md/test-inspect-fstab.sh \
|
||||
md/test-inspect-fstab-md.sh \
|
||||
md/test-list-filesystems.sh \
|
||||
md/test-list-md-devices.sh \
|
||||
md/test-lvm-on-md-device.sh \
|
||||
md/test-md-and-lvm-devices.sh \
|
||||
md/test-mdadm.sh \
|
||||
md/test-partitioned-md-devices.sh
|
||||
EXTRA_DIST += \
|
||||
md/test-inspect-fstab.sh \
|
||||
md/test-inspect-fstab-md.sh \
|
||||
md/test-list-filesystems.sh \
|
||||
md/test-list-md-devices.sh \
|
||||
md/test-lvm-on-md-device.sh \
|
||||
md/test-md-and-lvm-devices.sh \
|
||||
md/test-mdadm.sh \
|
||||
md/test-partitioned-md-devices.sh
|
||||
|
||||
EXTRA_DIST += \
|
||||
mountable/test-mountable-inspect.sh
|
||||
|
||||
TESTS += \
|
||||
mountable/test-internal-parse-mountable
|
||||
mountable/test-mountable-inspect.sh
|
||||
EXTRA_DIST += \
|
||||
mountable/test-mountable-inspect.sh
|
||||
check_PROGRAMS += \
|
||||
mountable/test-internal-parse-mountable
|
||||
|
||||
mountable_test_internal_parse_mountable_SOURCES = \
|
||||
mountable/test-internal-parse-mountable.c
|
||||
mountable_test_internal_parse_mountable_CPPFLAGS = \
|
||||
-DGUESTFS_NO_DEPRECATED=1 \
|
||||
-DGUESTFS_PRIVATE=1 \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
mountable_test_internal_parse_mountable_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
mountable_test_internal_parse_mountable_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
if HAVE_FUSE
|
||||
|
||||
TESTS += mount-local/test-parallel-mount-local
|
||||
check_PROGRAMS += mount-local/test-parallel-mount-local
|
||||
|
||||
mount_local_test_parallel_mount_local_SOURCES = \
|
||||
mount-local/test-parallel-mount-local.c
|
||||
mount_local_test_parallel_mount_local_CPPFLAGS = \
|
||||
-DGUESTFS_NO_DEPRECATED=1 \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/common/parallel -I$(top_builddir)/common/parallel
|
||||
mount_local_test_parallel_mount_local_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
$(FUSE_CFLAGS)
|
||||
mount_local_test_parallel_mount_local_LDADD = \
|
||||
$(FUSE_LIBS) \
|
||||
$(top_builddir)/common/parallel/libparallel.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
$(LIBVIRT_LIBS) \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
endif
|
||||
|
||||
TESTS += nbd/test-nbd.pl
|
||||
EXTRA_DIST += nbd/test-nbd.pl
|
||||
|
||||
TESTS += network/test-network.sh
|
||||
EXTRA_DIST += network/test-network.sh
|
||||
|
||||
TESTS += \
|
||||
ntfs/test-ntfscat.sh \
|
||||
ntfs/test-ntfsclone.sh
|
||||
EXTRA_DIST += \
|
||||
ntfs/test-ntfscat.sh \
|
||||
ntfs/test-ntfsclone.sh
|
||||
|
||||
SLOW_TESTS += parallel/test-parallel
|
||||
EXTRA_DIST += parallel/test-parallel
|
||||
|
||||
check_PROGRAMS += parallel/test-parallel
|
||||
|
||||
parallel_test_parallel_SOURCES = parallel/test-parallel.c
|
||||
parallel_test_parallel_CPPFLAGS = \
|
||||
-DGUESTFS_NO_DEPRECATED=1 \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
parallel_test_parallel_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
parallel_test_parallel_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
TESTS += \
|
||||
protocol/test-both-ends-cancel.sh \
|
||||
protocol/test-cancellation-download-librarycancels.sh \
|
||||
protocol/test-cancellation-upload-daemoncancels.sh \
|
||||
protocol/test-error-messages \
|
||||
protocol/test-launch-race.pl \
|
||||
protocol/test-qemudie-killsub.sh \
|
||||
protocol/test-qemudie-midcommand.sh \
|
||||
protocol/test-qemudie-synch.sh
|
||||
EXTRA_DIST += \
|
||||
protocol/test-both-ends-cancel.sh \
|
||||
protocol/test-cancellation-download-librarycancels.sh \
|
||||
protocol/test-cancellation-upload-daemoncancels.sh \
|
||||
protocol/test-launch-race.pl \
|
||||
protocol/test-qemudie-killsub.sh \
|
||||
protocol/test-qemudie-midcommand.sh \
|
||||
protocol/test-qemudie-synch.sh
|
||||
|
||||
check_PROGRAMS += protocol/test-error-messages
|
||||
|
||||
protocol_test_error_messages_SOURCES = \
|
||||
../../common/protocol/guestfs_protocol.h \
|
||||
protocol/test-error-messages.c
|
||||
protocol_test_error_messages_CPPFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/protocol -I$(top_builddir)/common/protocol \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
protocol_test_error_messages_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
$(RPC_CFLAGS)
|
||||
protocol_test_error_messages_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
$(LIBVIRT_LIBS) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
TESTS += \
|
||||
qemu/qemu-liveness.sh \
|
||||
qemu/qemu-snapshot-isolation-add-drive-opts-readonly.sh \
|
||||
qemu/qemu-snapshot-isolation-add-drive-ro.sh \
|
||||
qemu/qemu-snapshot-isolation-qcow2.sh \
|
||||
qemu/qemu-force-tcg.sh
|
||||
EXTRA_DIST += \
|
||||
qemu/qemu-liveness.sh \
|
||||
qemu/qemu-snapshot-isolation-add-drive-opts-readonly.sh \
|
||||
qemu/qemu-snapshot-isolation-add-drive-ro.sh \
|
||||
qemu/qemu-snapshot-isolation-qcow2.sh \
|
||||
qemu/qemu-force-tcg.sh
|
||||
|
||||
TESTS += \
|
||||
regressions/rhbz501893 \
|
||||
regressions/rhbz503169c13.sh \
|
||||
regressions/rhbz557655.sh \
|
||||
regressions/rhbz563450.sh \
|
||||
regressions/rhbz563450b.sh \
|
||||
regressions/rhbz576879.sh \
|
||||
regressions/rhbz578407.sh \
|
||||
regressions/rhbz580246.sh \
|
||||
regressions/rhbz602997.sh \
|
||||
regressions/rhbz690819.sh \
|
||||
regressions/rhbz789960.sh \
|
||||
regressions/rhbz790721 \
|
||||
regressions/rhbz811649.sh \
|
||||
regressions/rhbz895904.sh \
|
||||
regressions/rhbz914931 \
|
||||
regressions/rhbz957772.sh \
|
||||
regressions/rhbz975797.sh \
|
||||
regressions/rhbz1001875.sh \
|
||||
regressions/rhbz1054761.sh \
|
||||
regressions/rhbz1055452 \
|
||||
regressions/rhbz1091803.sh \
|
||||
regressions/rhbz1011907-1165785.sh \
|
||||
regressions/rhbz1174551.sh \
|
||||
regressions/rhbz1175196.sh \
|
||||
regressions/rhbz1370424.sh \
|
||||
regressions/rhbz1477623.sh \
|
||||
regressions/rhbz1930996.sh \
|
||||
regressions/test-big-heap \
|
||||
regressions/test-noexec-stack.pl
|
||||
EXTRA_DIST += \
|
||||
regressions/rhbz503169c13.sh \
|
||||
regressions/rhbz557655.sh \
|
||||
regressions/rhbz557655-expected.stdout \
|
||||
regressions/rhbz557655-expected.stderr \
|
||||
regressions/rhbz563450.sh \
|
||||
regressions/rhbz563450b.sh \
|
||||
regressions/rhbz576879.sh \
|
||||
regressions/rhbz578407.sh \
|
||||
regressions/rhbz580246.sh \
|
||||
regressions/rhbz602997.sh \
|
||||
regressions/rhbz690819.sh \
|
||||
regressions/rhbz727178.sh \
|
||||
regressions/rhbz789960.sh \
|
||||
regressions/rhbz811649.sh \
|
||||
regressions/rhbz895904.sh \
|
||||
regressions/rhbz909624.sh \
|
||||
regressions/rhbz957772.sh \
|
||||
regressions/rhbz975797.sh \
|
||||
regressions/rhbz1001875.sh \
|
||||
regressions/rhbz1011907-1165785.sh \
|
||||
regressions/rhbz1044014.sh \
|
||||
regressions/rhbz1044014.in \
|
||||
regressions/rhbz1044014.xml \
|
||||
regressions/rhbz1054761.sh \
|
||||
regressions/rhbz1091803.sh \
|
||||
regressions/rhbz1174551.sh \
|
||||
regressions/rhbz1175196.sh \
|
||||
regressions/rhbz1370424.sh \
|
||||
regressions/rhbz1370424.xml \
|
||||
regressions/rhbz1477623.sh \
|
||||
regressions/rhbz1930996.sh \
|
||||
regressions/test-noexec-stack.pl
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
TESTS += regressions/rhbz1044014.sh
|
||||
endif
|
||||
EXTRA_DIST += regressions/rhbz1044014.sh
|
||||
|
||||
tests_not_run = regressions/rhbz727178.sh
|
||||
EXTRA_DIST += regressions/rhbz727178.sh
|
||||
|
||||
check_PROGRAMS += \
|
||||
regressions/rhbz501893 \
|
||||
regressions/rhbz790721 \
|
||||
regressions/rhbz914931 \
|
||||
regressions/rhbz1055452 \
|
||||
regressions/test-big-heap
|
||||
|
||||
regressions_rhbz501893_SOURCES = regressions/rhbz501893.c
|
||||
regressions_rhbz501893_CPPFLAGS = \
|
||||
-DGUESTFS_NO_WARN_DEPRECATED=1 \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
regressions_rhbz501893_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
regressions_rhbz501893_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
regressions_rhbz790721_SOURCES = regressions/rhbz790721.c
|
||||
regressions_rhbz790721_CPPFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
regressions_rhbz790721_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
regressions_rhbz790721_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
regressions_rhbz914931_SOURCES = regressions/rhbz914931.c
|
||||
regressions_rhbz914931_CPPFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include \
|
||||
-DGUESTFS_PRIVATE=1
|
||||
regressions_rhbz914931_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
regressions_rhbz914931_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
regressions_rhbz1055452_SOURCES = regressions/rhbz1055452.c
|
||||
regressions_rhbz1055452_CPPFLAGS = \
|
||||
-DGUESTFS_NO_WARN_DEPRECATED=1 \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
regressions_rhbz1055452_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
regressions_rhbz1055452_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
regressions_test_big_heap_SOURCES = regressions/test-big-heap.c
|
||||
regressions_test_big_heap_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
regressions_test_big_heap_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
regressions_test_big_heap_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
SLOW_TESTS += regressions/rhbz909624.sh
|
||||
EXTRA_DIST += regressions/rhbz909624.sh
|
||||
|
||||
TESTS += relabel/test-relabel.pl
|
||||
EXTRA_DIST += relabel/test-relabel.pl
|
||||
|
||||
# Test relative paths to backing files. Mainly this is a test that we
|
||||
# don't break this.
|
||||
#
|
||||
# See eg:
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1053684
|
||||
# https://www.redhat.com/archives/libguestfs/2014-January/thread.html#00087
|
||||
# (and more)
|
||||
|
||||
TESTS += relative-paths/test-relative-paths.sh
|
||||
EXTRA_DIST += relative-paths/test-relative-paths.sh
|
||||
|
||||
TESTS += rsync/test-rsync.sh
|
||||
EXTRA_DIST += rsync/test-rsync.sh
|
||||
|
||||
# Test extended attributes and SELinux labelling, both using the API
|
||||
# directly, and over FUSE.
|
||||
|
||||
TESTS += \
|
||||
selinux/test-xattrs-direct.sh \
|
||||
selinux/test-selinux-direct.sh
|
||||
|
||||
if HAVE_FUSE
|
||||
TESTS += \
|
||||
selinux/test-xattrs-fuse.sh \
|
||||
selinux/test-selinux-fuse.sh
|
||||
endif
|
||||
|
||||
EXTRA_DIST += \
|
||||
selinux/run-test.pl \
|
||||
selinux/test-xattrs-direct.sh \
|
||||
selinux/test-xattrs-fuse.sh \
|
||||
selinux/test-selinux-direct.sh \
|
||||
selinux/test-selinux-fuse.sh
|
||||
|
||||
TESTS += \
|
||||
syslinux/test-syslinux.sh \
|
||||
syslinux/test-extlinux.sh
|
||||
|
||||
EXTRA_DIST += \
|
||||
syslinux/test-syslinux.sh \
|
||||
syslinux/test-extlinux.sh \
|
||||
syslinux/test-syslinux.pl
|
||||
|
||||
CLEANFILES += syslinux/syslinux-guest.img syslinux/extlinux-guest.img
|
||||
|
||||
TESTS += tmpdirs/test-tmpdirs.pl
|
||||
EXTRA_DIST += tmpdirs/test-tmpdirs.pl
|
||||
|
||||
TESTS += \
|
||||
tsk/test-download-inode.sh \
|
||||
tsk/test-download-blocks.sh \
|
||||
tsk/test-filesystem-walk.sh \
|
||||
tsk/test-find-inode.sh
|
||||
EXTRA_DIST += \
|
||||
tsk/test-download-inode.sh \
|
||||
tsk/test-download-blocks.sh \
|
||||
tsk/test-filesystem-walk.sh \
|
||||
tsk/test-find-inode.sh
|
||||
|
||||
TESTS += xfs/test-xfs-misc.pl
|
||||
EXTRA_DIST += xfs/test-xfs-misc.pl
|
||||
|
||||
# XXX Fix these tests.
|
||||
# if HAVE_LIBVIRT
|
||||
|
||||
# # This LD_PRELOAD library can be used to precisely control the XML
|
||||
# # returned by libvirt.
|
||||
# check_LTLIBRARIES = xml/libfakevirtxml.la
|
||||
|
||||
# xml_libfakevirtxml_la_SOURCES = xml/fake-libvirt-xml.c
|
||||
# xml_libfakevirtxml_la_CFLAGS = $(LIBVIRT_CFLAGS)
|
||||
# # -version-info and -rpath force libtool to build a shared library.
|
||||
# xml_libfakevirtxml_la_LDFLAGS = -version-info 0:0:0 -rpath /nowhere
|
||||
|
||||
# TESTS_ENVIRONMENT = \
|
||||
# abs_srcdir=$(abs_srcdir) \
|
||||
# LD_PRELOAD=.libs/libfakevirtxml.so \
|
||||
# $(top_builddir)/run --test
|
||||
|
||||
# TESTS += xml/rhbz701814.pl
|
||||
# endif
|
||||
|
||||
EXTRA_DIST += \
|
||||
xml/rhbz701814.pl \
|
||||
xml/rhbz701814-faked.xml \
|
||||
xml/rhbz701814-node.xml
|
||||
|
||||
TESTS += yara/test-yara-scan.sh
|
||||
TESTS += yara/test-yara-scan.sh
|
||||
@@ -1,28 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2012 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
EXTRA_DIST = $(TESTS)
|
||||
|
||||
TESTS = $(SLOW_TESTS)
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
SLOW_TESTS = test-big-dirs.pl
|
||||
|
||||
check-slow:
|
||||
$(MAKE) check TESTS="$(SLOW_TESTS)" SLOW=1
|
||||
@@ -1,29 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2009-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-btrfs-misc.pl \
|
||||
test-btrfs-devices.sh \
|
||||
test-btrfs-subvolume-default.pl \
|
||||
test-btrfs-replace.sh
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -1,279 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2009-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
generator_built = tests.c
|
||||
|
||||
BUILT_SOURCES = $(generator_built)
|
||||
|
||||
EXTRA_DIST = $(BUILT_SOURCES)
|
||||
|
||||
CLEANFILES += \
|
||||
test.log \
|
||||
testdownload.tmp
|
||||
|
||||
check_PROGRAMS = \
|
||||
tests \
|
||||
test-command \
|
||||
test-just-header \
|
||||
test-create-handle \
|
||||
test-config \
|
||||
test-add-drive-opts \
|
||||
test-last-errno \
|
||||
test-backend-settings \
|
||||
test-private-data \
|
||||
test-user-cancel \
|
||||
test-debug-to-file \
|
||||
test-environment \
|
||||
test-pwd \
|
||||
test-event-string \
|
||||
test-threads
|
||||
if HAVE_LIBDL
|
||||
check_PROGRAMS += \
|
||||
test-dlopen
|
||||
endif
|
||||
|
||||
TESTS = \
|
||||
tests \
|
||||
test-just-header \
|
||||
test-create-handle \
|
||||
test-config \
|
||||
test-add-drive-opts \
|
||||
test-last-errno \
|
||||
test-backend-settings \
|
||||
test-private-data \
|
||||
test-user-cancel \
|
||||
test-debug-to-file \
|
||||
test-environment \
|
||||
test-event-string \
|
||||
test-threads
|
||||
if HAVE_LIBDL
|
||||
TESTS += \
|
||||
test-dlopen
|
||||
endif
|
||||
|
||||
if HAVE_CXX
|
||||
check_PROGRAMS += test-just-header-cxx
|
||||
TESTS += test-just-header-cxx
|
||||
endif
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
check_PROGRAMS += test-add-libvirt-dom
|
||||
TESTS += test-add-libvirt-dom
|
||||
endif
|
||||
EXTRA_DIST += test-add-libvirt-dom.c
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
SKIP_TEST_COMMAND=$(shell ldd test-command | grep -sq 'not a dynamic executable' || echo 1) \
|
||||
SKIP_TEST_COMMAND_LINES=$(shell ldd test-command | grep -sq 'not a dynamic executable' || echo 1) \
|
||||
SKIP_TEST_COMMAND=$(shell ldd test-pwd | grep -sq 'not a dynamic executable' || echo 1) \
|
||||
$(top_builddir)/run --test
|
||||
LOG_COMPILER = $(VG)
|
||||
|
||||
#SKIP_TEST_CHECKSUM_8=$(shell if test `find ../initramfs -name squashfs.ko | wc -l` -eq 0; then echo 1; fi)
|
||||
|
||||
tests_SOURCES = \
|
||||
tests.c \
|
||||
tests.h \
|
||||
tests-main.c
|
||||
tests_CPPFLAGS = \
|
||||
-DGUESTFS_PRIVATE=1 \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
tests_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
$(PCRE2_CFLAGS)
|
||||
tests_LDADD = \
|
||||
$(PCRE2_LIBS) \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
$(LIBVIRT_LIBS) \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
# This binary must be statically linked. It is used for testing
|
||||
# the "guestfs_command" and "guestfs_command_lines" functions.
|
||||
|
||||
test_command_SOURCES = test-command.c
|
||||
test_command_LDFLAGS = -all-static
|
||||
|
||||
test_pwd_SOURCES = test-pwd.c
|
||||
test_pwd_LDFLAGS = -all-static
|
||||
|
||||
# Hand-written C API tests.
|
||||
|
||||
test_just_header_SOURCES = test-just-header.c
|
||||
test_just_header_CPPFLAGS = -I$(top_srcdir)/include
|
||||
test_just_header_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_just_header_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
if HAVE_CXX
|
||||
test_just_header_cxx_SOURCES = test-just-header-cxx.cpp
|
||||
test_just_header_cxx_CPPFLAGS = -I$(top_srcdir)/include
|
||||
test_just_header_cxx_CXXFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_just_header_cxx_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
endif
|
||||
|
||||
test_create_handle_SOURCES = test-create-handle.c
|
||||
test_create_handle_CPPFLAGS = -I$(top_srcdir)/include
|
||||
test_create_handle_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_create_handle_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
if HAVE_LIBDL
|
||||
test_dlopen_SOURCES = test-dlopen.c
|
||||
test_dlopen_CPPFLAGS = -I$(top_srcdir)/include
|
||||
test_dlopen_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
-DLIBRARY=\"$(top_builddir)/lib/.libs/libguestfs.so.0\"
|
||||
test_dlopen_LDADD = \
|
||||
-ldl
|
||||
endif
|
||||
|
||||
test_config_SOURCES = test-config.c
|
||||
test_config_CPPFLAGS = -I$(top_srcdir)/include
|
||||
test_config_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_config_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
test_add_drive_opts_SOURCES = test-add-drive-opts.c
|
||||
test_add_drive_opts_CPPFLAGS = -I$(top_srcdir)/include
|
||||
test_add_drive_opts_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_add_drive_opts_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
test_last_errno_SOURCES = test-last-errno.c
|
||||
test_last_errno_CPPFLAGS = -I$(top_srcdir)/include
|
||||
test_last_errno_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_last_errno_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
test_backend_settings_SOURCES = test-backend-settings.c
|
||||
test_backend_settings_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
test_backend_settings_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_backend_settings_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
test_private_data_SOURCES = test-private-data.c
|
||||
test_private_data_CPPFLAGS = -I$(top_srcdir)/include
|
||||
test_private_data_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_private_data_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
test_user_cancel_SOURCES = test-user-cancel.c
|
||||
test_user_cancel_CPPFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
test_user_cancel_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_user_cancel_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la -lm \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
test_debug_to_file_SOURCES = test-debug-to-file.c
|
||||
test_debug_to_file_CPPFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib
|
||||
test_debug_to_file_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_debug_to_file_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
test_environment_SOURCES = test-environment.c
|
||||
test_environment_CPPFLAGS = -I$(top_srcdir)/include
|
||||
test_environment_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_environment_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
test_event_string_SOURCES = test-event-string.c
|
||||
test_event_string_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/gnulib/lib \
|
||||
-I$(top_builddir)/gnulib/lib
|
||||
test_event_string_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_event_string_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
test_threads_SOURCES = test-threads.c
|
||||
test_threads_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/gnulib/lib \
|
||||
-I$(top_builddir)/gnulib/lib
|
||||
test_threads_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_threads_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LTLIBTHREAD) \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
test_add_libvirt_dom_SOURCES = test-add-libvirt-dom.c
|
||||
test_add_libvirt_dom_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/gnulib/lib \
|
||||
-I$(top_builddir)/gnulib/lib
|
||||
test_add_libvirt_dom_CFLAGS = \
|
||||
$(LIBVIRT_CFLAGS) \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_add_libvirt_dom_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la $(LIBVIRT_LIBS) \
|
||||
$(LTLIBINTL) \
|
||||
$(LTLIBTHREAD) $(top_builddir)/gnulib/lib/libgnu.la
|
||||
endif
|
||||
|
||||
check-valgrind:
|
||||
$(MAKE) VG="@VG@" check
|
||||
@@ -446,8 +446,8 @@ create_handle (void)
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (guestfs_add_drive_ro (g, "../../test-data/test.iso") == -1) {
|
||||
printf ("FAIL: guestfs_add_drive_ro ../../test-data/test.iso\n");
|
||||
if (guestfs_add_drive_ro (g, "../test-data/test.iso") == -1) {
|
||||
printf ("FAIL: guestfs_add_drive_ro ../test-data/test.iso\n");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2009-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-charset-fidelity
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test $(VG)
|
||||
|
||||
check_PROGRAMS = $(TESTS)
|
||||
|
||||
test_charset_fidelity_SOURCES = test-charset-fidelity.c
|
||||
test_charset_fidelity_CPPFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
test_charset_fidelity_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_charset_fidelity_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
$(LIBVIRT_LIBS) \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
@@ -1,27 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2014 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-disk-create.sh
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -1,36 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2015 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Tests in this subdirectory run the daemon as a captive host process
|
||||
# and send commands directly to it. There is a small Perl library
|
||||
# called 'captive-daemon.pm' in this directory to help with this.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
check_DATA = captive-daemon.pm
|
||||
|
||||
TESTS = \
|
||||
test-daemon-start.pl \
|
||||
test-btrfs.pl
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
|
||||
check-valgrind:
|
||||
$(MAKE) check TEST_WITH_VALGRIND=1
|
||||
@@ -29,7 +29,6 @@ $| = 1;
|
||||
|
||||
# Filled in by autoconf.
|
||||
my %var;
|
||||
$var{top_builddir} = "@top_builddir@";
|
||||
$var{abs_top_srcdir} = "@abs_top_srcdir@";
|
||||
$var{abs_top_builddir} = "@abs_top_builddir@";
|
||||
$var{VALGRIND} = "@VALGRIND@";
|
||||
@@ -60,11 +59,11 @@ sub run_tests {
|
||||
|
||||
# Assemble the command we will run in the subprocess.
|
||||
my $cmd =
|
||||
"$var{top_builddir}/daemon/guestfsd --channel $sockname -r -t -l";
|
||||
"$var{abs_top_builddir}/daemon/guestfsd --channel $sockname -r -t -l";
|
||||
if ($verbose) {
|
||||
$cmd = $cmd . " -v"
|
||||
}
|
||||
if ($ENV{TEST_WITH_VALGRIND}) {
|
||||
if ($ENV{VG}) { # $VG env var will be set when make check-valgrind.
|
||||
$cmd = $VG . " " . $cmd
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ use warnings;
|
||||
|
||||
use File::Temp qw/tempdir/;
|
||||
|
||||
require './captive-daemon.pm';
|
||||
require './daemon/captive-daemon.pm';
|
||||
|
||||
# Set $PATH to include directory that will have phony 'btrfs' binary.
|
||||
my $bindir = tempdir (CLEANUP => 1);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require './captive-daemon.pm';
|
||||
require './daemon/captive-daemon.pm';
|
||||
|
||||
sub tests {
|
||||
my $g = shift;
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2014 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-blkdiscard.pl \
|
||||
test-discard.pl \
|
||||
test-fstrim.pl
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -1,26 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2012 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-disk-labels.pl
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -1,68 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2012 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
$(top_builddir)/run --test
|
||||
|
||||
TESTS = \
|
||||
test-qemu-drive.sh
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
TESTS += \
|
||||
test-qemu-drive-libvirt.sh \
|
||||
test-qemu-drive-with-blocksize-libvirt.sh
|
||||
|
||||
if ENABLE_APPLIANCE
|
||||
TESTS += \
|
||||
test-27-disks.sh \
|
||||
test-255-disks.sh \
|
||||
test-add-lots-of-disks.sh \
|
||||
test-add-drive-with-blocksize.sh
|
||||
endif
|
||||
endif
|
||||
|
||||
SLOW_TESTS = \
|
||||
test-max-disks.sh
|
||||
|
||||
TESTS += \
|
||||
$(SLOW_TESTS)
|
||||
|
||||
check-slow:
|
||||
$(MAKE) check TESTS="$(SLOW_TESTS)" SLOW=1
|
||||
|
||||
check_PROGRAMS = test-add-disks
|
||||
|
||||
test_add_disks_SOURCES = \
|
||||
test-add-disks.c
|
||||
test_add_disks_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib
|
||||
test_add_disks_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_add_disks_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la \
|
||||
$(LIBXML2_LIBS)
|
||||
|
||||
EXTRA_DIST = \
|
||||
debug-qemu.sh \
|
||||
$(TESTS)
|
||||
@@ -22,4 +22,4 @@ skip_if_skipped
|
||||
|
||||
skip_unless_backend libvirt
|
||||
|
||||
./test-add-disks -n 255
|
||||
disks/test-add-disks -n 255
|
||||
|
||||
@@ -23,4 +23,4 @@ set -e
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
./test-add-disks -n 27
|
||||
disks/test-add-disks -n 27
|
||||
|
||||
@@ -22,4 +22,4 @@ N=255
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
./test-add-disks --just-add -n $N
|
||||
disks/test-add-disks --just-add -n $N
|
||||
|
||||
@@ -21,4 +21,4 @@ $TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
slow_test
|
||||
|
||||
./test-add-disks --max
|
||||
disks/test-add-disks --max
|
||||
|
||||
@@ -18,19 +18,20 @@
|
||||
# Test that disks map to the correct qemu -drive parameter.
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
skip_unless_libvirt_minimum_version 1 1 3
|
||||
|
||||
guestfish="guestfish -c test://$abs_builddir/test-qemu-drive-libvirt.xml"
|
||||
guestfish="guestfish -c test://$abs_builddir/disks/test-qemu-drive-libvirt.xml"
|
||||
|
||||
export LIBGUESTFS_BACKEND=direct
|
||||
export LIBGUESTFS_HV="${abs_srcdir}/debug-qemu.sh"
|
||||
export LIBGUESTFS_HV="${abs_srcdir}/disks/debug-qemu.sh"
|
||||
export DEBUG_QEMU_FILE="${abs_builddir}/test-qemu-drive-libvirt.out"
|
||||
|
||||
# Setup the fake pool.
|
||||
pool_dir=tmp
|
||||
pool_dir=disks/tmp
|
||||
rm -rf "$pool_dir"
|
||||
mkdir "$pool_dir"
|
||||
touch "$pool_dir/in-pool"
|
||||
@@ -96,7 +97,7 @@ rm "$DEBUG_QEMU_FILE"
|
||||
|
||||
$guestfish -d pool1 run ||:
|
||||
check_output
|
||||
grep -sq -- "-drive file=$abs_builddir/tmp/in-pool" "$DEBUG_QEMU_FILE" || fail pool1
|
||||
grep -sq -- "-drive file=$abs_builddir/disks/tmp/in-pool" "$DEBUG_QEMU_FILE" || fail pool1
|
||||
rm "$DEBUG_QEMU_FILE"
|
||||
|
||||
# To do:
|
||||
|
||||
@@ -24,10 +24,10 @@ $TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
skip_unless_libvirt_minimum_version 1 1 3
|
||||
|
||||
guestfish="guestfish -c test://$abs_builddir/test-qemu-drive-libvirt.xml"
|
||||
guestfish="guestfish -c test://$abs_builddir/disks/test-qemu-drive-libvirt.xml"
|
||||
|
||||
export LIBGUESTFS_BACKEND=direct
|
||||
export LIBGUESTFS_HV="${abs_srcdir}/debug-qemu.sh"
|
||||
export LIBGUESTFS_HV="${abs_srcdir}/disks/debug-qemu.sh"
|
||||
export DEBUG_QEMU_FILE="${abs_builddir}/test-qemu-drive-with-blocksize-libvirt.out"
|
||||
|
||||
function check_output ()
|
||||
|
||||
@@ -23,7 +23,7 @@ $TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
export LIBGUESTFS_BACKEND=direct
|
||||
export LIBGUESTFS_HV="$abs_srcdir/debug-qemu.sh"
|
||||
export LIBGUESTFS_HV="$abs_srcdir/disks/debug-qemu.sh"
|
||||
export DEBUG_QEMU_FILE="$abs_builddir/test-qemu-drive.out"
|
||||
|
||||
function check_output ()
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2013-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
EXTRA_DIST = \
|
||||
test-console-debug.pl \
|
||||
libvirt-auth.xml
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
check_PROGRAMS =
|
||||
|
||||
TESTS = test-console-debug.pl
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
TESTS += test-libvirt-auth-callbacks
|
||||
check_PROGRAMS += test-libvirt-auth-callbacks
|
||||
|
||||
test_libvirt_auth_callbacks_SOURCES = test-libvirt-auth-callbacks.c
|
||||
test_libvirt_auth_callbacks_CPPFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
test_libvirt_auth_callbacks_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
$(LIBVIRT_CFLAGS)
|
||||
test_libvirt_auth_callbacks_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBVIRT_LIBS) \
|
||||
$(LIBXML2_LIBS) \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
endif
|
||||
@@ -71,7 +71,8 @@ main (int argc, char *argv[])
|
||||
if (cwd == NULL)
|
||||
error (EXIT_FAILURE, errno, "getcwd");
|
||||
|
||||
if (asprintf (&test_uri, "test://%s/%s/libvirt-auth.xml", cwd, srcdir) == -1)
|
||||
if (asprintf (&test_uri, "test://%s/%s/events/libvirt-auth.xml",
|
||||
cwd, srcdir) == -1)
|
||||
error (EXIT_FAILURE, errno, "asprintf");
|
||||
|
||||
free (cwd);
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2016 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-expand-gpt.pl
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -1,28 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2012 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-hot-add.pl \
|
||||
test-hot-remove.pl
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS) \
|
||||
test-hotplug-repeated.pl
|
||||
@@ -1,41 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2013 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
# Test uses the Python SimpleHTTPServer module which is
|
||||
# conveniently part of Python core.
|
||||
|
||||
if HAVE_PYTHON
|
||||
|
||||
# Test disabled for now. Several things conspire to stop this working:
|
||||
#
|
||||
# (1) Python may throw "Broken pipe" errors:
|
||||
# http://bugs.python.org/issue14574
|
||||
# Fixed upstream in Python >= 2.7.5.
|
||||
#
|
||||
# (2) Fedora 18's Curl is broken. Can be resolved by compiling Curl
|
||||
# from git and setting LD_LIBRARY_PATH=~/curl/lib/.libs
|
||||
|
||||
# TESTS = test-http.py
|
||||
#
|
||||
# TESTS_ENVIRONMENT = $(top_builddir)/run --test $(PYTHON)
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
test-http.py
|
||||
@@ -24,7 +24,7 @@ from time import sleep
|
||||
from random import randint
|
||||
|
||||
progname = os.path.basename(sys.argv[0])
|
||||
guestsdir = "../../test-data/phony-guests"
|
||||
guestsdir = "../test-data/phony-guests"
|
||||
listen_addr = "localhost"
|
||||
#listen_addr = "127.0.0.1"
|
||||
#listen_addr = ""
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2013 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-journal.pl
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -28,7 +28,7 @@ use Sys::Guestfs;
|
||||
exit 77 if $ENV{SKIP_TEST_JOURNAL_PL};
|
||||
|
||||
my $g = Sys::Guestfs->new ();
|
||||
$g->add_drive ("../../test-data/phony-guests/fedora.img",
|
||||
$g->add_drive ("../test-data/phony-guests/fedora.img",
|
||||
readonly => 1, format => "raw");
|
||||
$g->launch ();
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2009-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-luks.sh \
|
||||
test-luks-list.sh \
|
||||
test-key-option.sh \
|
||||
test-key-option-inspect.sh
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -26,7 +26,7 @@ skip_if_skipped
|
||||
skip_unless_feature_available luks
|
||||
skip_unless_phony_guest fedora-luks.img
|
||||
|
||||
disk=../../test-data/phony-guests/fedora-luks.img
|
||||
disk=../test-data/phony-guests/fedora-luks.img
|
||||
device=/dev/sda2
|
||||
|
||||
# Get the UUID of the LUKS device.
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2009-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-lvm-filtering.sh \
|
||||
test-lvm-mapping.pl
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -1,33 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2009-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-inspect-fstab.sh \
|
||||
test-inspect-fstab-md.sh \
|
||||
test-list-filesystems.sh \
|
||||
test-list-md-devices.sh \
|
||||
test-lvm-on-md-device.sh \
|
||||
test-md-and-lvm-devices.sh \
|
||||
test-mdadm.sh \
|
||||
test-partitioned-md-devices.sh
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -1,56 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2009-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
if HAVE_FUSE
|
||||
|
||||
TESTS = test-parallel-mount-local
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
LOG_COMPILER = $(VG)
|
||||
|
||||
check_PROGRAMS = $(TESTS)
|
||||
|
||||
test_parallel_mount_local_SOURCES = \
|
||||
test-parallel-mount-local.c
|
||||
test_parallel_mount_local_CPPFLAGS = \
|
||||
-DGUESTFS_NO_DEPRECATED=1 \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/common/parallel -I$(top_builddir)/common/parallel \
|
||||
-I$(top_srcdir)/df
|
||||
test_parallel_mount_local_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
$(FUSE_CFLAGS)
|
||||
test_parallel_mount_local_LDADD = \
|
||||
$(FUSE_LIBS) \
|
||||
$(top_builddir)/common/parallel/libparallel.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
$(LIBVIRT_LIBS) \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
check-valgrind:
|
||||
$(MAKE) VG="@VG@" check
|
||||
|
||||
endif
|
||||
@@ -366,7 +366,7 @@ guestunmount (const char *mp, unsigned flags)
|
||||
}
|
||||
|
||||
snprintf (cmd, sizeof cmd,
|
||||
"../../fuse/guestunmount%s %s",
|
||||
"../fuse/guestunmount%s %s",
|
||||
(flags & GUESTUNMOUNT_SILENT) ? " --quiet" : "", mp);
|
||||
|
||||
status = system (cmd);
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2012 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
EXTRA_DIST = \
|
||||
test-mountable-inspect.sh
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
TESTS=test-internal-parse-mountable test-mountable-inspect.sh
|
||||
check_PROGRAMS = test-internal-parse-mountable
|
||||
|
||||
test_internal_parse_mountable_SOURCES = test-internal-parse-mountable.c
|
||||
test_internal_parse_mountable_CPPFLAGS = \
|
||||
-DGUESTFS_NO_DEPRECATED=1 \
|
||||
-DGUESTFS_PRIVATE=1 \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
test_internal_parse_mountable_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_internal_parse_mountable_LDADD = \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
@@ -31,7 +31,7 @@ rm -f root.tmp test.qcow2 test.output
|
||||
# and then inspect it.
|
||||
guestfish -- \
|
||||
disk-create test.qcow2 qcow2 -1 \
|
||||
backingfile:../../test-data/phony-guests/fedora-btrfs.img backingformat:raw
|
||||
backingfile:../test-data/phony-guests/fedora-btrfs.img backingformat:raw
|
||||
|
||||
# Test that basic inspection works and the expected filesystems are
|
||||
# found
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2013 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-nbd.pl
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -22,8 +22,6 @@ use POSIX qw(getcwd);
|
||||
|
||||
use Sys::Guestfs;
|
||||
|
||||
my $disk = "../../test-data/phony-guests/fedora.img";
|
||||
|
||||
my $pid = 0;
|
||||
END { kill 15, $pid if $pid > 0 };
|
||||
|
||||
@@ -40,11 +38,16 @@ if (system ("qemu-nbd --help >/dev/null 2>&1") != 0) {
|
||||
exit 77
|
||||
}
|
||||
|
||||
# Make a local copy of the disk so we can open it for writes.
|
||||
my $disk = "../test-data/phony-guests/fedora.img";
|
||||
if (! -r $disk || -z $disk) {
|
||||
print "$0: test skipped because $disk is not found\n";
|
||||
exit 77
|
||||
}
|
||||
|
||||
system ("cp $disk fedora-nbd.img") == 0 || die;
|
||||
$disk = "fedora-nbd.img";
|
||||
|
||||
my $has_format_opt = system ("qemu-nbd --help | grep -q -- --format") == 0;
|
||||
|
||||
sub run_test {
|
||||
@@ -126,4 +129,6 @@ if (Sys::Guestfs->new()->get_backend() !~ /^libvirt/) {
|
||||
printf "https://bugzilla.redhat.com/show_bug.cgi?id=922888\n";
|
||||
}
|
||||
|
||||
unlink $disk;
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2013 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-network.sh
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -1,27 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2012-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-ntfscat.sh \
|
||||
test-ntfsclone.sh
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -1,47 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2012 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = $(SLOW_TESTS)
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
SLOW_TESTS = test-parallel
|
||||
|
||||
check_PROGRAMS = test-parallel
|
||||
|
||||
test_parallel_SOURCES = test-parallel.c
|
||||
test_parallel_CPPFLAGS = \
|
||||
-DGUESTFS_NO_DEPRECATED=1 \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
test_parallel_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_parallel_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
#check-valgrind:
|
||||
# $(MAKE) VG="@VG@" TESTS="test-parallel" check
|
||||
|
||||
check-slow:
|
||||
$(MAKE) check TESTS="$(SLOW_TESTS)" SLOW=1
|
||||
@@ -1,60 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2009-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
EXTRA_DIST = \
|
||||
test-both-ends-cancel.sh \
|
||||
test-cancellation-download-librarycancels.sh \
|
||||
test-cancellation-upload-daemoncancels.sh \
|
||||
test-launch-race.pl \
|
||||
test-qemudie-killsub.sh \
|
||||
test-qemudie-midcommand.sh \
|
||||
test-qemudie-synch.sh
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
TESTS = \
|
||||
test-both-ends-cancel.sh \
|
||||
test-cancellation-download-librarycancels.sh \
|
||||
test-cancellation-upload-daemoncancels.sh \
|
||||
test-error-messages \
|
||||
test-launch-race.pl \
|
||||
test-qemudie-killsub.sh \
|
||||
test-qemudie-midcommand.sh \
|
||||
test-qemudie-synch.sh
|
||||
|
||||
check_PROGRAMS = test-error-messages
|
||||
|
||||
test_error_messages_SOURCES = \
|
||||
../../common/protocol/guestfs_protocol.h \
|
||||
test-error-messages.c
|
||||
test_error_messages_CPPFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/protocol -I$(top_builddir)/common/protocol \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
test_error_messages_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
$(RPC_CFLAGS)
|
||||
test_error_messages_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
$(LIBVIRT_LIBS) \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
@@ -1,37 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2011-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Safety and liveness tests of components that libguestfs depends upon
|
||||
# (not of libguestfs itself). Mainly this is for qemu and the kernel.
|
||||
# This test is the first to run.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
qemu-liveness.sh \
|
||||
qemu-snapshot-isolation-add-drive-opts-readonly.sh \
|
||||
qemu-snapshot-isolation-add-drive-ro.sh \
|
||||
qemu-snapshot-isolation-qcow2.sh \
|
||||
qemu-force-tcg.sh
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = $(TESTS)
|
||||
|
||||
# Don't run these tests in parallel, since they are designed to check
|
||||
# the integrity of qemu.
|
||||
.NOTPARALLEL:
|
||||
@@ -1,174 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2009-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
EXTRA_DIST = \
|
||||
rhbz503169c13.sh \
|
||||
rhbz557655.sh \
|
||||
rhbz557655-expected.stdout \
|
||||
rhbz557655-expected.stderr \
|
||||
rhbz563450.sh \
|
||||
rhbz563450b.sh \
|
||||
rhbz576879.sh \
|
||||
rhbz578407.sh \
|
||||
rhbz580246.sh \
|
||||
rhbz602997.sh \
|
||||
rhbz690819.sh \
|
||||
rhbz727178.sh \
|
||||
rhbz789960.sh \
|
||||
rhbz811649.sh \
|
||||
rhbz895904.sh \
|
||||
rhbz909624.sh \
|
||||
rhbz957772.sh \
|
||||
rhbz975797.sh \
|
||||
rhbz1001875.sh \
|
||||
rhbz1011907-1165785.sh \
|
||||
rhbz1044014.sh \
|
||||
rhbz1044014.in \
|
||||
rhbz1044014.xml \
|
||||
rhbz1054761.sh \
|
||||
rhbz1091803.sh \
|
||||
rhbz1174551.sh \
|
||||
rhbz1175196.sh \
|
||||
rhbz1370424.sh \
|
||||
rhbz1370424.xml \
|
||||
rhbz1477623.sh \
|
||||
rhbz1930996.sh \
|
||||
test-noexec-stack.pl
|
||||
|
||||
TESTS = \
|
||||
rhbz501893 \
|
||||
rhbz503169c13.sh \
|
||||
rhbz557655.sh \
|
||||
rhbz563450.sh \
|
||||
rhbz563450b.sh \
|
||||
rhbz576879.sh \
|
||||
rhbz578407.sh \
|
||||
rhbz580246.sh \
|
||||
rhbz602997.sh \
|
||||
rhbz690819.sh \
|
||||
rhbz789960.sh \
|
||||
rhbz790721 \
|
||||
rhbz811649.sh \
|
||||
rhbz895904.sh \
|
||||
rhbz914931 \
|
||||
rhbz957772.sh \
|
||||
rhbz975797.sh \
|
||||
rhbz1001875.sh \
|
||||
rhbz1054761.sh \
|
||||
rhbz1055452 \
|
||||
rhbz1091803.sh \
|
||||
rhbz1011907-1165785.sh \
|
||||
rhbz1174551.sh \
|
||||
rhbz1175196.sh \
|
||||
rhbz1370424.sh \
|
||||
rhbz1477623.sh \
|
||||
rhbz1930996.sh \
|
||||
test-big-heap \
|
||||
test-noexec-stack.pl \
|
||||
$(SLOW_TESTS)
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
TESTS += rhbz1044014.sh
|
||||
endif
|
||||
|
||||
tests_not_run = \
|
||||
rhbz727178.sh
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
NOEXEC_CHECK="$(top_builddir)/lib/.libs/libguestfs.so $(top_builddir)/daemon/guestfsd" \
|
||||
$(top_builddir)/run --test
|
||||
|
||||
check_PROGRAMS = \
|
||||
rhbz501893 \
|
||||
rhbz790721 \
|
||||
rhbz914931 \
|
||||
rhbz1055452 \
|
||||
test-big-heap
|
||||
|
||||
rhbz501893_SOURCES = rhbz501893.c
|
||||
rhbz501893_CPPFLAGS = \
|
||||
-DGUESTFS_NO_WARN_DEPRECATED=1 \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
rhbz501893_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
rhbz501893_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
rhbz790721_SOURCES = rhbz790721.c
|
||||
rhbz790721_CPPFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
rhbz790721_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
rhbz790721_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
rhbz914931_SOURCES = rhbz914931.c
|
||||
rhbz914931_CPPFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include \
|
||||
-DGUESTFS_PRIVATE=1
|
||||
rhbz914931_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
rhbz914931_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(LTLIBINTL) \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(top_builddir)/gnulib/lib/libgnu.la
|
||||
|
||||
rhbz1055452_SOURCES = rhbz1055452.c
|
||||
rhbz1055452_CPPFLAGS = \
|
||||
-DGUESTFS_NO_WARN_DEPRECATED=1 \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
rhbz1055452_CFLAGS = \
|
||||
-pthread \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
rhbz1055452_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
test_big_heap_SOURCES = test-big-heap.c
|
||||
test_big_heap_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/include
|
||||
test_big_heap_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_big_heap_LDADD = \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
SLOW_TESTS = \
|
||||
rhbz909624.sh
|
||||
|
||||
check-slow:
|
||||
$(MAKE) check TESTS="$(CHECK_SLOW)" SLOW=1
|
||||
@@ -82,6 +82,6 @@ grep -E 'set[-_]memsize|truncate[-_]size' rhbz557655.err~ |
|
||||
grep -Ev '(<=|=>) truncate_size' > rhbz557655.err
|
||||
rm rhbz557655.err~
|
||||
|
||||
diff -u $srcdir/rhbz557655-expected.stdout rhbz557655.out
|
||||
diff -u $srcdir/rhbz557655-expected.stderr rhbz557655.err
|
||||
diff -u $srcdir/regressions/rhbz557655-expected.stdout rhbz557655.out
|
||||
diff -u $srcdir/regressions/rhbz557655-expected.stderr rhbz557655.err
|
||||
rm rhbz557655.out rhbz557655.err rhbz557655.img
|
||||
|
||||
@@ -28,7 +28,7 @@ skip_unless_test_iso
|
||||
rm -f rhbz563450b.out
|
||||
|
||||
guestfish --ro > rhbz563450b.out <<EOF
|
||||
add-cdrom ../../test-data/test.iso
|
||||
add-cdrom ../test-data/test.iso
|
||||
|
||||
run
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2016 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Test setfiles function.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-relabel.pl
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
test-relabel.pl
|
||||
@@ -1,37 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2014 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Test relative paths to backing files. Mainly this is a test that we
|
||||
# don't break this.
|
||||
#
|
||||
# See eg:
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1053684
|
||||
# https://www.redhat.com/archives/libguestfs/2014-January/thread.html#00087
|
||||
# (and more)
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-relative-paths.sh
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
check-valgrind:
|
||||
$(MAKE) VG="@VG@" check
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -45,7 +45,7 @@ qemu-img create -f qcow2 backing3 10M
|
||||
qemu-img create -f qcow2 -b ./backing3 -F qcow2 overlay3
|
||||
|
||||
qemu-img create -f qcow2 backing4 10M
|
||||
qemu-img create -f qcow2 -b ../../tests/relative-paths/backing4 -F qcow2 overlay4
|
||||
qemu-img create -f qcow2 -b ../tests/backing4 -F qcow2 overlay4
|
||||
|
||||
qemu-img create -f qcow2 backing5 10M
|
||||
pushd dir1
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2009-2020 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-rsync.sh
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -55,7 +55,7 @@ case "$backend" in
|
||||
esac
|
||||
|
||||
pwd="$(pwd)"
|
||||
datadir="$(cd ../../test-data/files && pwd)"
|
||||
datadir="$(cd ../test-data/files && pwd)"
|
||||
|
||||
rm -rf tmp
|
||||
mkdir tmp
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2012 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# Test extended attributes and SELinux labelling, both using the API
|
||||
# directly, and over FUSE.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-xattrs-direct.sh \
|
||||
test-selinux-direct.sh
|
||||
|
||||
if HAVE_FUSE
|
||||
TESTS += \
|
||||
test-xattrs-fuse.sh \
|
||||
test-selinux-fuse.sh
|
||||
endif
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
run-test.pl \
|
||||
test-xattrs-direct.sh \
|
||||
test-xattrs-fuse.sh \
|
||||
test-selinux-direct.sh \
|
||||
test-selinux-fuse.sh
|
||||
@@ -137,7 +137,7 @@ if ($test_via eq "direct") {
|
||||
my $pid = fork ();
|
||||
die "fork: $!" unless defined $pid;
|
||||
if ($pid == 0) {
|
||||
exec ("$srcdir/run-test.pl", "--test", $mpdir, $test_type);
|
||||
exec ("$srcdir/selinux/run-test.pl", "--test", $mpdir, $test_type);
|
||||
die "run-test.pl: exec failed: $!\n";
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ sub run_fuse_tests
|
||||
}
|
||||
|
||||
# Unmount the test directory.
|
||||
if (system ("../../fuse/guestunmount", $mpdir) != 0) {
|
||||
if (system ("../fuse/guestunmount", $mpdir) != 0) {
|
||||
die "failed to unmount FUSE directory\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
exec $srcdir/run-test.pl selinux direct
|
||||
exec $srcdir/selinux/run-test.pl selinux direct
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
exec $srcdir/run-test.pl selinux fuse
|
||||
exec $srcdir/selinux/run-test.pl selinux fuse
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
exec $srcdir/run-test.pl xattrs direct
|
||||
exec $srcdir/selinux/run-test.pl xattrs direct
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
exec $srcdir/run-test.pl xattrs fuse
|
||||
exec $srcdir/selinux/run-test.pl xattrs fuse
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2013 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-syslinux.sh \
|
||||
test-extlinux.sh
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS) \
|
||||
test-syslinux.pl
|
||||
|
||||
CLEANFILES += syslinux-guest.img extlinux-guest.img
|
||||
@@ -16,4 +16,4 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
BOOTLOADER=extlinux $srcdir/test-syslinux.pl
|
||||
BOOTLOADER=extlinux $srcdir/syslinux/test-syslinux.pl
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
BOOTLOADER=syslinux $srcdir/test-syslinux.pl
|
||||
BOOTLOADER=syslinux $srcdir/syslinux/test-syslinux.pl
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2012 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-tmpdirs.pl
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -1,29 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2016 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-download-inode.sh \
|
||||
test-download-blocks.sh \
|
||||
test-filesystem-walk.sh \
|
||||
test-find-inode.sh
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -1,26 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2013 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-xfs-misc.pl
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -1,44 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2012 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
if HAVE_LIBVIRT
|
||||
|
||||
# This LD_PRELOAD library can be used to precisely control the XML
|
||||
# returned by libvirt.
|
||||
check_LTLIBRARIES = libfakevirtxml.la
|
||||
|
||||
libfakevirtxml_la_SOURCES = fake-libvirt-xml.c
|
||||
libfakevirtxml_la_CFLAGS = $(LIBVIRT_CFLAGS)
|
||||
# -version-info and -rpath force libtool to build a shared library.
|
||||
libfakevirtxml_la_LDFLAGS = -version-info 0:0:0 -rpath /nowhere
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
abs_srcdir=$(abs_srcdir) \
|
||||
LD_PRELOAD=.libs/libfakevirtxml.so \
|
||||
$(top_builddir)/run --test
|
||||
|
||||
TESTS = \
|
||||
rhbz701814.pl
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
rhbz701814.pl \
|
||||
rhbz701814-faked.xml \
|
||||
rhbz701814-node.xml
|
||||
@@ -1,26 +0,0 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2016 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
TESTS = \
|
||||
test-yara-scan.sh
|
||||
|
||||
TESTS_ENVIRONMENT = $(top_builddir)/run --test
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS)
|
||||
@@ -39,7 +39,7 @@ rule TestRule
|
||||
EOF
|
||||
|
||||
output=$(
|
||||
guestfish --ro -a ../../test-data/phony-guests/blank-fs.img <<EOF
|
||||
guestfish --ro -a ../test-data/phony-guests/blank-fs.img <<EOF
|
||||
run
|
||||
mount /dev/sda1 /
|
||||
write /text.txt "some text"
|
||||
|
||||
Reference in New Issue
Block a user