From 2a085ee67b47c7568fe1c04705a4b738594af8de Mon Sep 17 00:00:00 2001 From: Jose Carlos Venegas Munoz Date: Wed, 18 Dec 2019 01:38:51 +0000 Subject: [PATCH] clh: virtiofsd: check path is not empty Check if path is not empty this makes, this help unit test know why the function failed. Signed-off-by: Jose Carlos Venegas Munoz --- virtcontainers/clh.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/virtcontainers/clh.go b/virtcontainers/clh.go index a90e48461e..b4ca05155f 100644 --- a/virtcontainers/clh.go +++ b/virtcontainers/clh.go @@ -600,6 +600,10 @@ func (clh *cloudHypervisor) generateSocket(id string, useVsock bool) (interface{ func (clh *cloudHypervisor) setupVirtiofsd(timeout int) (remain int, err error) { + if clh.config.VirtioFSDaemon == "" { + return timeout, errors.New("Virtiofsd path is empty") + } + sockPath, perr := clh.virtioFsSocketPath(clh.id) if perr != nil { return 0, perr