On 07/03/14 01:11, Mike Latimer wrote:
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;
We should get the libvirt "connection" closed before restarting
libvirtd, in tck, it should be "$tck->cleanup()".
Regards,
Osier