From: Richard W.M. Jones Date: Tue, 20 Aug 2013 12:59:41 +0000 (+0100) Subject: qemu-sanity-check initial commit. X-Git-Tag: v1.1.1~9 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=d3110e6318aa040e499479640ce33efe5ccc0f3e;p=qemu-sanity-check.git qemu-sanity-check initial commit. --- d3110e6318aa040e499479640ce33efe5ccc0f3e diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..8450892 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,38 @@ +# Makefile for qemu-sanity-check +# 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +EXTRA_DIST = \ + qemu-sanity-check.in \ + qemu-sanity-check.pod + +CLEANFILES = qemu-sanity-check + +bin_SCRIPTS = qemu-sanity-check + +if HAVE_POD2MAN + +CLEANFILES += qemu-sanity-check.1 +man_MANS = qemu-sanity-check.1 + +qemu-sanity-check.1: qemu-sanity-check.pod + $(POD2MAN) -c "Virtualization Support" \ + --release "$(PACKAGE)-$(VERSION)" \ + $< > $@ + +endif + +TESTS = qemu-sanity-check diff --git a/README b/README new file mode 100644 index 0000000..7ce7518 --- /dev/null +++ b/README @@ -0,0 +1,56 @@ +qemu-sanity-check is a short shell script that test-boots a Linux +kernel under qemu, making sure it boots up to userspace. The idea is +to test the Linux kernel and/or qemu to make sure they are working. + +Please read the qemu-sanity-check(1) man page, but basic usage is very +simple. You probably want to use one of the following commands: + +Test qemu on path against most recent installed Linux kernel in /boot: + + qemu-sanity-check + +Test a given qemu binary with a given Linux kernel (you can omit +either option): + + qemu-sanity-check --qemu=/path/to/qemu --kernel=/path/to/vmlinuz + +License +------- + +The shell script is licensed under the GNU General Public License, +version 2 or (at your option) a later version. See 'COPYING' for the +full license. + +Author +------ + +Richard W.M. Jones + +Building +-------- + +Requirements: + + bash - to run the script + + qemu and/or Linux kernel - something to test + + pod2man (from Perl) - if you want to build the manual page + +To build: + + From git: From tarball: + autoreconf -i + ./configure ./configure + make make + make check make check + +Developers +---------- + +Upstream git repository is: +http://git.annexia.org/?p=qemu-sanity-check.git;a=summary + +Please send patches etc to the qemu-devel mailing list: +https://lists.nongnu.org/mailman/listinfo/qemu-devel +(but also CC the author). diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..1807999 --- /dev/null +++ b/configure.ac @@ -0,0 +1,32 @@ +# qemu-sanity-check +# 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +AC_INIT([qemu-sanity-check],[1.1.1]) +AM_INIT_AUTOMAKE([foreign]) + +AC_CHECK_PROG([POD2MAN], [pod2man], [pod2man], [no]) +if test "x$POD2MAN" = "xno"; then + AC_MSG_WARN([pod2man was not found. This is needed to build man pages.]) +fi +AM_CONDITIONAL([HAVE_POD2MAN], [test "x$POD2MAN" != "xno"]) + +dnl Produce output files. +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_FILES([qemu-sanity-check],[chmod +x qemu-sanity-check]) +AC_CONFIG_FILES([Makefile]) + +AC_OUTPUT diff --git a/qemu-sanity-check.in b/qemu-sanity-check.in new file mode 100644 index 0000000..50b50ef --- /dev/null +++ b/qemu-sanity-check.in @@ -0,0 +1,45 @@ +#!/bin/bash +# -*- shell-script -*- +# qemu-sanity-check +# 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +# Handle command line parsing. + +function usage { + echo "qemu-sanity-check [options]" + echo "Options:" + echo " --help Display this help" + echo " --version Display version and exit" + exit 0 +} + +TEMP=$(getopt \ + -o v \ + --long help \ + --long version \ + -n 'qemu-sanity-check' -- "$@") +if [ $? != 0 ]; then exit 1; fi +eval set -- "$TEMP" + +while true; do + case "$1" in + --help) usage ;; + -v|--version) echo "@PACKAGE_NAME@ @PACKAGE_VERSION@"; exit 0 ;; + --) shift; break ;; + *) fail "internal error ($1)" ;; + esac +done