On Wed, Mar 22, 2023 at 2:30 PM Michal Privoznik <mprivozn@redhat.com> wrote:
The virConnectOpen(), well virConnectOpenInternal() reports an
error if embed root is not an absolute path. This is a fair
requirement, but our qemu_shim doesn't check this requirement and
instead mkdir()-s passed path only to fail later on, leaving the
empty directory behind:

I would reword the commit message a bit:

This is a fair requirement, but our qemu_shim doesn't check this
requirement and passes the path to mkdir(), only to fail later on,
leaving the empty directory behind:
 

  $ ls -d asd
  ls: cannot access 'asd': No such file or directory

  $ virt-qemu-run -r asd whatever.xml
  virt-qemu-run: cannot open qemu:///embed?root=asd: unsupported configuration: root path must be absolute

  $ ls -d asd
  asd

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/qemu/qemu_shim.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

 
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>

Kristina