Looking at the changelog this looks suspicious:
- Immediately create "bus" and "class" directories in /sys to fix udev
enumerator (thanks David Lechner)
Checking that theory in the debugger confirms that - breaking just prior to the failing mkdir.
Good-case
183 r = g_mkdir (bus, 0744);
(gdb) p bus
$4 = 0x5555555be330 "/tmp/umockdev.P7PGA1/sys/bus"
(gdb) shell find /tmp/umockdev.P7PGA1/
/tmp/umockdev.P7PGA1/
/tmp/umockdev.P7PGA1/sys
/tmp/umockdev.P7PGA1/ioctl
/tmp/umockdev.P7PGA1/ioctl/_default
Bad-case
183 r = g_mkdir (bus, 0744);
(gdb) p bus
$4 = 0x5555555be560 "/tmp/umockdev.7MRGA1/sys/bus"
gdb) shell find /tmp/umockdev.7MRGA1/
/tmp/umockdev.7MRGA1/
/tmp/umockdev.7MRGA1/sys
/tmp/umockdev.7MRGA1/sys/bus
/tmp/umockdev.7MRGA1/sys/class
/tmp/umockdev.7MRGA1/ioctl
/tmp/umockdev.7MRGA1/ioctl/_default
So we either need to stop umockdev from doing that (but that will break whatever it fixed to introduce this) OR we need to teach bolt tests to be ok, if the directory already exists.
Looking at the changelog this looks suspicious:
- Immediately create "bus" and "class" directories in /sys to fix udev
enumerator (thanks David Lechner)
That change is at /github. com/martinpitt/ umockdev/ commit/ 5e829601434610e f510bda12571291 509a3a51d2
https:/
And that explains it, the bolt test code wants to create /tmp/umockdev. RQBNA1/ sys/bus and it already exists.
Offending code in bolt tests is at: /gitlab. freedesktop. org/bolt/ bolt/-/ blob/master/ tests/mock- sysfs.c# L183
https:/
Checking that theory in the debugger confirms that - breaking just prior to the failing mkdir.
Good-case P7PGA1/ sys/bus" P7PGA1/ P7PGA1/ P7PGA1/ sys P7PGA1/ ioctl P7PGA1/ ioctl/_ default
183 r = g_mkdir (bus, 0744);
(gdb) p bus
$4 = 0x5555555be330 "/tmp/umockdev.
(gdb) shell find /tmp/umockdev.
/tmp/umockdev.
/tmp/umockdev.
/tmp/umockdev.
/tmp/umockdev.
Bad-case 7MRGA1/ sys/bus" 7MRGA1/ 7MRGA1/ 7MRGA1/ sys 7MRGA1/ sys/bus 7MRGA1/ sys/class 7MRGA1/ ioctl 7MRGA1/ ioctl/_ default
183 r = g_mkdir (bus, 0744);
(gdb) p bus
$4 = 0x5555555be560 "/tmp/umockdev.
gdb) shell find /tmp/umockdev.
/tmp/umockdev.
/tmp/umockdev.
/tmp/umockdev.
/tmp/umockdev.
/tmp/umockdev.
/tmp/umockdev.
So we either need to stop umockdev from doing that (but that will break whatever it fixed to introduce this) OR we need to teach bolt tests to be ok, if the directory already exists.