[libvirt] [PATCH] libvirt-tck: Ignore SIGPIPE in 051-daemon-hook.t

Mike Latimer mlatimer at suse.com
Thu Mar 6 17:11:01 UTC 2014


This test completes successfully, but results in a return code of 141 due to
a broken pipe when restarting libvirtd. This patch just masks the SIGPIPE
and undefines $tck to avoid the 141 return code. If there is a way to
reestablish the tck connection after the restart, that would be a better
solution.

---
 scripts/hooks/051-daemon-hook.t | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/hooks/051-daemon-hook.t b/scripts/hooks/051-daemon-hook.t
index 165cf4e..a6c3d03 100644
--- a/scripts/hooks/051-daemon-hook.t
+++ b/scripts/hooks/051-daemon-hook.t
@@ -163,5 +163,10 @@ SKIP: {
     ok(`service libvirtd status` =~ /running/, "libvirtd is running");
 
     $hook->cleanup();
+
+    # Restarting libvirtd broke the tck connection, so ignore sigpipe and
+    # undefine $tck to avoid a return code of 141
+    $SIG{PIPE} = 'IGNORE';
+    undef $tck;
 };
 
-- 
1.8.4.5




More information about the libvir-list mailing list