summaryrefslogtreecommitdiffstats
path: root/tests/guests
Commit message (Collapse)AuthorAgeFilesLines
* New API: guestfs_shutdown: Cleanly shutdown the backend.Richard W.M. Jones2012-07-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The new API splits orderly close into a two-step process: if (guestfs_shutdown (g) == -1) { /* handle the error, eg. qemu error */ } guestfs_close (g); Note that the explicit shutdown step is only necessary in the case where you have made changes to the disk image and want to handle write errors. Read the documentation for further information. This change also: - deprecates guestfs_kill_subprocess - turns guestfs_kill_subprocess into the same as guestfs_shutdown - changes guestfish and other tools to call shutdown + close where necessary (not for read-only tools) - updates documentation - updates examples
* tests: Add ./run --test option.Richard W.M. Jones2012-06-261-2/+2
| | | | | | | This option, when added via TESTS_ENVIRONMENT = [...] $(top_builddir)/run --test allows us to run the tests and only print the full output (including debugging etc) when the test fails.
* build: Define builddir and abs_srcdir when they are missing.Richard W.M. Jones2012-06-181-3/+3
| | | | | | | | | | | | | | | | | | | | | RHEL 5-era autoconf did not define these, so define them manually when they are missing. Define builddir as '.' The scripts require this. It won't work in the srcdir != builddir case, but we don't care about that for RHEL 5. This commit also moves the builddir / abs_srcdir variable setting above the include of subdir-rules.mk, in case that include uses these variables. Useful script: for f in $(find -name Makefile.am | xargs fgrep '$(abs_srcdir)' -l) ; do if ! grep -q '^abs_srcdir' $f; then echo missing in $f fi done
* guests: Add /etc/shadow file to fedora.img.Richard W.M. Jones2012-04-211-0/+5
| | | | This is used for testing file permissions and SELinux contexts.
* tests: Space before parens in perl code.Richard W.M. Jones2012-04-211-77/+77
|
* inspection: Remove spurious warning for Ubuntu 10.04 with encrypted swap ↵Richard W.M. Jones2012-04-121-0/+3
| | | | (RHBZ#811872).
* tests: Fix guest building so parallel 'make -jN check' works.Richard W.M. Jones2012-04-065-29/+33
| | | | | | | | | | | | | | | | This means renaming various temporary files (eg. fstab.tmp) that several of the scripts were using so they don't conflict (eg. fstab.tmp.$$). Also the rule: fedora-md1.img fedora-md2.img: guest-aux/make-fedora-img.pl causes the script to run twice in parallel when using 'make -jN'. Replace this with a stamp file so it runs once: fedora-md1.img fedora-md2.img: stamp-fedora-md.img stamp-fedora-md.img: guest-aux/make-fedora-img.pl
* tests: Don't print "4" when running make-windows-img.shRichard W.M. Jones2012-04-061-1/+1
| | | | | The return value of the pwrite-device command -- 4 (bytes) -- is printed out. Hide it instead.
* New API: set-label, for setting a label on any filesystem.Richard W.M. Jones2012-02-273-4/+4
| | | | | | Currently only ext2/3/4 and (newly) NTFS are supported. This change also deprecates set-e2label.
* edit: Preserve file permissions, UID, GID, SELinux context on edited files. ↵Richard W.M. Jones2012-02-091-0/+2
| | | | (RHBZ#788641)
* maint: use $var notation rather than ${var} when possibleJim Meyering2012-01-233-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed some uses of ${srcdir} in shell scripts. That is almost always better written as $srcdir. The patch below converts most such variable references. Here are the few remaining candidates: $ git grep -i -E '\$\{[a-zA-Z_0-9]+\}'|grep -v Makefile.in.in configure.ac: JAR_INSTALL_DIR=\${prefix}/share/java configure.ac: JNI_INSTALL_DIR=\${libdir} debian/rules: for TEST in ${DEBIAN_SKIP_TEST}; do \ debian/rules:# mv $${mod} $$(dirname $${mod})/libguestfsmod.so; \ java/Makefile.am:libguestfs_jar_DATA = libguestfs-${VERSION}.jar java/Makefile.am:libguestfs-${VERSION}.jar: $(libguestfs_jar_class_files) perl/lib/Sys/Guestfs/Lib.pm: "-f", '${Package} ${Version} ${Architecture} ${Status}\n', perl/typemap: croak (\"${Package}::$func_name(): called on a closed handle\"); perl/typemap: croak (\"${Package}::$func_name(): $var is not a blessed HV reference\"); tests/data/Makefile.am: echo "$${i}abcdefghijklmnopqrstuvwxyz"; \ We could change all of those, too, except the ones in configure.ac and Makefile.am, since they refer to Make variables. Even those should be changed, but to use the preferred Makefile notation: $(prefix), $(libdir), $(VERSION). >From a86770ecd45666232a94d76c8725c8f9b1c76e3a Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> Date: Mon, 23 Jan 2012 11:15:12 +0100 Subject: [PATCH libguestfs] maint: use $var notation rather than ${var} when possible The only case to avoid in a shell script is when the byte after the "}" is word-constituent, and concatenating it would thus change the name of the variable. These changes were induced by running this command: git grep -l -i -E '\$\{(srcdir|md)' \ |xargs perl -pi -e 's/\$\{(srcdir|md)\}($|\w)/\$$1$2/gi' The "g" was needed because there was one line with two instances. The "i" is to handle ${SRCDIR}. The ($|\w) ensures that concatenating whatever follows the "}" won't change semantics. * gobject/run-bindtests: Use "$srcdir", not "${srcdir}". * haskell/run-bindtests: Likewise. * java/run-bindtests: Likewise. * ocaml/run-bindtests: Likewise. * perl/run-bindtests: Likewise. * python/run-bindtests: Likewise. * ruby/run-bindtests: Likewise. * tests/guests/guest-aux/make-debian-img.sh: Likewise, but $SRCDIR. * tests/guests/guest-aux/make-ubuntu-img.sh: Likewise. * tests/guests/guest-aux/make-windows-img.sh: Likewise. * tests/md/test-mdadm.sh: Likewise, but $md.
* Tempus fugit.Richard W.M. Jones2012-01-183-3/+3
| | | | Update all copyright dates to 2012.
* tests: Split images -> tests/data + tests/guestsRichard W.M. Jones2011-12-2213-0/+685