build: update to latest gnulib

* .gnulib: Update to latest, for improved 'make syntax-check' and
compiler warnings.
* m4/virt-compile-warnings.m4 (LIBVIRT_COMPILE_WARNINGS):
Re-silence -Wformat-nonliteral.
* cfg.mk (_test_script_regex): Recognize our test scripts.
* gnulib/local/lib/*.diff: Drop, now that gnulib has this.
* tests/virsh-optparse: Fix use of compare.
* tests/virsh-schedinfo: Likewise.
This commit is contained in:
Eric Blake 2011-11-29 16:42:23 -07:00
parent da8061eefe
commit 059d746ddb
7 changed files with 18 additions and 50 deletions

@ -1 +1 @@
Subproject commit e56e96fe20f72586e9ec5c528b9a9a06daa2ecc6
Subproject commit 6b93d00f5410ec183e3a70ebf8e418e3b1bb0191

3
cfg.mk
View File

@ -36,6 +36,9 @@ generated_files = \
$(srcdir)/src/remote/*_protocol.[ch] \
$(srcdir)/gnulib/lib/*.[ch]
# We haven't converted all scripts to using gnulib's init.sh yet.
_test_script_regex = \<\(init\|test-lib\)\.sh\>
# Tests not to run as part of "make distcheck".
local-checks-to-skip = \
changelog-check \

View File

@ -1,26 +0,0 @@
diff --git c/lib/openpty.c i/lib/openpty.c
index c398db5..d61d5ba 100644
--- c/lib/openpty.c
+++ i/lib/openpty.c
@@ -32,6 +32,21 @@ rpl_openpty (int *amaster, int *aslave, char *name,
(struct winsize *) winp);
}
+#elif (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* mingw */
+
+# include <errno.h>
+
+int
+openpty (int *amaster _GL_UNUSED, int *aslave _GL_UNUSED,
+ char *name _GL_UNUSED,
+ struct termios const *termp _GL_UNUSED,
+ struct winsize const *winp _GL_UNUSED)
+{
+ /* Mingw lacks pseudo-terminals altogether. */
+ errno = ENOSYS;
+ return -1;
+}
+
#else /* AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 10, mingw */
# include <fcntl.h>

View File

@ -1,13 +0,0 @@
diff --git c/lib/pty.in.h i/lib/pty.in.h
index aff989c..00eecc6 100644
--- c/lib/pty.in.h
+++ i/lib/pty.in.h
@@ -92,6 +92,8 @@ _GL_WARN_ON_USE (forkpty, "forkpty is not declared consistently - "
/* Create pseudo tty master slave pair and set terminal attributes
according to TERMP and WINP. Return handles for both ends in
*AMASTER and *ASLAVE, and return the name of the slave end in NAME. */
+struct termios;
+struct winsize;
# if @REPLACE_OPENPTY@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef openpty

View File

@ -55,8 +55,8 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
# Things like virAsprintf mean we can't use this
dontwarn="$dontwarn -Wformat-nonliteral"
# We might fundamentally need some of these disabled forever, but ideally
# we'd turn many of them on
# We might fundamentally need some of these disabled forever, but
# ideally we'd turn many of them on
dontwarn="$dontwarn -Wfloat-equal"
dontwarn="$dontwarn -Wdeclaration-after-statement"
dontwarn="$dontwarn -Wcast-qual"
@ -88,6 +88,10 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
# that one off, so we need to manually enable this again
gl_WARN_ADD([-Wjump-misses-init])
# GNULIB turns on -Wformat=2 which implies -Wformat-nonliteral,
# so we need to manually re-exclude it.
gl_WARN_ADD([-Wno-format-nonliteral])
# This should be < 256 really. Currently we're down to 4096,
# but using 1024 bytes sized buffers (mostly for virStrerror)
# stops us from going down further

View File

@ -65,7 +65,7 @@ for args in \
'--count=2 test' \
; do
virsh -d0 -c $test_url setvcpus $args >out 2>>err || fail=1
LC_ALL=C sort out | compare - exp-out || fail=1
LC_ALL=C sort out | compare exp-out - || fail=1
done
# Another complex parsing example
@ -84,7 +84,7 @@ EOF
virsh -q -c $test_url snapshot-create-as --print-xml test \
--diskspec 'vda,file=a&b,,c,snapshot=external' --description '1<2' \
--diskspec vdb >out 2>>err || fail=1
compare out exp-out || fail=1
compare exp-out out || fail=1
cat <<\EOF > exp-out || framework_failure
<domainsnapshot>
@ -98,7 +98,7 @@ cat <<\EOF > exp-out || framework_failure
EOF
virsh -q -c $test_url snapshot-create-as --print-xml test name vda vdb \
>out 2>>err || fail=1
compare out exp-out || fail=1
compare exp-out out || fail=1
cat <<\EOF > exp-out || framework_failure
<domainsnapshot>
@ -122,7 +122,7 @@ for args in \
; do
virsh -q -c $test_url snapshot-create-as --print-xml $args \
>out 2>>err || fail=1
compare out exp-out || fail=1
compare exp-out out || fail=1
done
test -s err && fail=1
@ -133,6 +133,6 @@ error: this function is not supported by the connection driver: virDomainQemuMon
EOF
virsh -q -c $test_url qemu-monitor-command test a >out 2>err && fail=1
test -s out && fail=1
compare err exp-err || fail=1
compare exp-err err || fail=1
(exit $fail); exit $fail

View File

@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that virsh schedinfo --set invalid=val fails
# Copyright (C) 2010 Red Hat, Inc.
# Copyright (C) 2010-2011 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
@ -43,7 +43,7 @@ fail=0
test_url=test:///default
virsh -c $test_url schedinfo 1 --set j=k >out 2>err && fail=1
compare out exp-out || fail=1
compare err exp-err || fail=1
compare exp-out out || fail=1
compare exp-err err || fail=1
(exit $fail); exit $fail