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 <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
Jose Carlos Venegas Munoz 2019-12-18 01:38:51 +00:00
parent af5c9c2320
commit 2a085ee67b

View File

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