Check why it doesn't
$ libtool --mode=execute gdb ./src/virt-aa-helper
(gdb) b vah_add_path
(gdb) run -u libvirt-deadbeef-dead-beef-dead-beefdeadbeef -r --dryrun < /tmp/symlink-test.xml
[...]
Breakpoint 1, vah_add_path (buf=0x7fffffffd500, path=0x55555578b000 "/var/run/symlinkdisk", perms=0x55555555ff53 "rwk", recursive=false)
It seems this fails:
virFileExists(path)
Due to that realpath is never executed and the path is taken as-is.
Breakpoint 2, virFileExists (path=0x55555578b000 "/var/run/symlinkdisk") at util/virfile.c:1860
1860 return access(path, F_OK) == 0;
(gdb) finish
Value returned is $5 = false
Ok, now things make sense.
The file does not exist so it does not try to derive.
That also is the explanation why it wasn't an issue all the time (=it mostly worked)
But there are cases - like the vhostuser mode=server - where qemu is the one that has to CREATE the file.
So the check will fail, and the path not be translated.
Check why it doesn't aa-helper deadbeef- dead-beef- dead-beefdeadbe ef -r --dryrun < /tmp/symlink- test.xml d500, path=0x55555578b000 "/var/run/ symlinkdisk" , perms=0x5555555 5ff53 "rwk", recursive=false)
$ libtool --mode=execute gdb ./src/virt-
(gdb) b vah_add_path
(gdb) run -u libvirt-
[...]
Breakpoint 1, vah_add_path (buf=0x7fffffff
It seems this fails: (path)
virFileExists
Due to that realpath is never executed and the path is taken as-is.
Breakpoint 2, virFileExists (path=0x5555557 8b000 "/var/run/ symlinkdisk" ) at util/virfile.c:1860
1860 return access(path, F_OK) == 0;
(gdb) finish
Value returned is $5 = false
Ok, now things make sense.
The file does not exist so it does not try to derive.
That also is the explanation why it wasn't an issue all the time (=it mostly worked)
But there are cases - like the vhostuser mode=server - where qemu is the one that has to CREATE the file.
So the check will fail, and the path not be translated.