Re: [libvirt] [PATCH] * qemud/libvirtd_qemu.aug: Add "security_driver".

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel Veillard wrote:
> On Tue, Mar 03, 2009 at 05:43:28PM +0100, Jim Meyering wrote:
>> >From 0e79e00614e8c6cd2b7fe7bcad1d52b2de1a3a58 Mon Sep 17 00:00:00 2001
>> diff --git a/qemud/libvirtd.conf b/qemud/libvirtd.conf
>> index 1fd5918..0e0b40c 100644
>> --- a/qemud/libvirtd.conf
>> +++ b/qemud/libvirtd.conf
>> @@ -289,7 +289,7 @@
>>  # separated by spaces.
>>  #
>>  # e.g:
>> -# log_filters="3:remote 4:event"
>> +#log_filters = "3:remote 4:event"
>>  # to only get warning or errors from the remote layer and only errors from
>>  # the event layer.
>>
>> @@ -311,5 +311,5 @@
>>  #
>>  # Multiple output can be defined , they just need to be separated by spaces.
>>  # e.g.:
>> -# log_outputs="3:syslog:libvirtd"
>> +#log_outputs = "3:syslog:libvirtd"
>>  # to log all warnings and errors to syslog under the libvirtd ident
>
>   okay, all other examples use spaces around the equal sign, thanks
> I didn't noticed that when adding them.

Thanks, but as I hinted, that change was incomplete.
The important bit (mentioned at top) was to remove the space
between "#" and param name.

Once I did that, the daemon-conf test failed because
setting log_outputs to that sample value sent all expected output
to the log file rather than to stderr where the test requires it.

Here's the complete patch:
[not urgent, just better coverage]

>From 3c7c3bfcbf0c7fdac65b70124e8a6d7790b16844 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@xxxxxxxxxx>
Date: Tue, 3 Mar 2009 20:31:55 +0100
Subject: [PATCH] tests: exercise log_outputs and log_filters along with the rest

* tests/daemon-conf: Handle log_outputs and log_filters specially,
now that they're recognized.
* qemud/libvirtd.conf: Use required formatting so that daemon-conf
also tests log_outputs and log_filters.
---
 qemud/libvirtd.conf |    4 ++--
 tests/daemon-conf   |    8 +++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/qemud/libvirtd.conf b/qemud/libvirtd.conf
index 1fd5918..0e0b40c 100644
--- a/qemud/libvirtd.conf
+++ b/qemud/libvirtd.conf
@@ -289,7 +289,7 @@
 # separated by spaces.
 #
 # e.g:
-# log_filters="3:remote 4:event"
+#log_filters = "3:remote 4:event"
 # to only get warning or errors from the remote layer and only errors from
 # the event layer.

@@ -311,5 +311,5 @@
 #
 # Multiple output can be defined , they just need to be separated by spaces.
 # e.g.:
-# log_outputs="3:syslog:libvirtd"
+#log_outputs = "3:syslog:libvirtd"
 # to log all warnings and errors to syslog under the libvirtd ident
diff --git a/tests/daemon-conf b/tests/daemon-conf
index a5e86ae..43ea705 100755
--- a/tests/daemon-conf
+++ b/tests/daemon-conf
@@ -20,7 +20,12 @@ grep '[a-z_]  *=  *[^ ]' "$conf" | grep -vE '^#[a-z_]+ = ' \
   && { echo "$0: found unexpected lines (above) in $conf" 1>&2; exit 1; }

 # Start with the sample libvirtd.conf file, uncommenting all real directives.
-sed -n 's/^#\([^ #]\)/\1/p' "$conf" > tmp.conf
+# Be careful to set log_outputs so that all log output goes to stderr,
+# and use an empty string for "log_filters".
+sed -n 's/^#\([^ #]\)/\1/p' "$conf" \
+  | sed -e 's/^\(log_outputs =\).*/\1 "0:stderr"/' \
+	-e 's/^\(log_filters =\).*/\1 ""/' \
+  > tmp.conf

 # Iterate through that list of directives, corrupting one RHS at a
 # time and running libvirtd with the resulting config.  Each libvirtd
@@ -44,6 +49,7 @@ while :; do

   case $rhs in
     # '"'*) msg='should be a string';;
+    '"?:'*) msg='expecting a separator';;
     '"'*) msg='invalid type: got long; expected string';;
     [0-9]*) msg='invalid type: got string; expected long';;
     '['*) msg='must be a string or list of strings';;
--
1.6.2.rc1.285.gc5f54

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]