Re: [PATCH] Don't let daemon-conf test fail when auditing is disabled

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

 



2010/10/19 Eric Blake <eblake@xxxxxxxxxx>:
> On 10/19/2010 12:34 PM, Matthias Bolte wrote:
>>
>> ---
>> Âtests/daemon-conf | Â Â4 ++++
>> Â1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/tests/daemon-conf b/tests/daemon-conf
>> index 0e756d4..921e589 100755
>> --- a/tests/daemon-conf
>> +++ b/tests/daemon-conf
>> @@ -86,6 +86,10 @@ fi
>> Â# Replace the invalid host_uuid with one that is valid:
>> Âsed 's/^\(host_uuid =.*\)0"$/\11"/' tmp.conf> Âk; mv k tmp.conf
>>
>> +# Relax audit_level from 2 to 1, otherwise libvirtd will report an error
>> +# when auditing is disabled on the host or during compilation
>> +sed 's/^\(audit_level =.*\)2$/\1 1/' tmp.conf> Âk; mv k tmp.conf
>
> ACK.
>
> But should we be combining those sed/mv sequences into a single run, to cut
> down on the number of processes being run?
>

Here's v2 that does this.

Matthias
From 0f155ab1f6cb6cbae669349c0ba7046200dfb2d3 Mon Sep 17 00:00:00 2001
From: Matthias Bolte <matthias.bolte@xxxxxxxxxxxxxx>
Date: Tue, 19 Oct 2010 20:27:51 +0200
Subject: [PATCH] Don't let daemon-conf test fail when auditing is disabled

---
 tests/daemon-conf |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/daemon-conf b/tests/daemon-conf
index 0e756d4..6c91d96 100755
--- a/tests/daemon-conf
+++ b/tests/daemon-conf
@@ -83,8 +83,11 @@ if test 108 -lt `echo $SOCKPATH | wc -c`; then
     skip_test_ "CWD too long"
 fi
 
-# Replace the invalid host_uuid with one that is valid:
-sed 's/^\(host_uuid =.*\)0"$/\11"/' tmp.conf > k; mv k tmp.conf
+# Replace the invalid host_uuid with one that is valid and
+# relax audit_level from 2 to 1, otherwise libvirtd will report an error
+# when auditing is disabled on the host or during compilation
+sed 's/^\(host_uuid =.*\)0"$/\11"/; s/^\(audit_level =.*\)2$/\1 1/' tmp.conf > k
+mv k tmp.conf
 
 $abs_top_builddir/daemon/libvirtd --pid-file=pid-file --config=tmp.conf \
     > log 2>&1 & pid=$!
-- 
1.7.0.4

--
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]