[systemd-devel] 'udevadm test' removes/adds by-id/by-path links

Robert Milasan rmilasan at suse.com
Thu Nov 28 02:36:56 PST 2013


Hello,
  when running 'udevadm test /sys/block/sdb --action=remove' then links
  to the device node in /dev/disk/{by-id,by-path} are being removed and
  running udevadm test with action=add, the links are re-added.

robert at viper:~> ls -l /dev/disk/by-id/|grep sdb
lrwxrwxrwx 1 root root  9 Nov 28 11:13
usb-Corsair_Flash_Voyager_00000025000057-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Nov 28 10:50
usb-Corsair_Flash_Voyager_00000025000057-0:0-part1 -> ../../sdb1

robert at viper:~> sudo udevadm test /sys/block/sdb --action=remove
>/dev/null 2>&1
robert at viper:~> ls -l /dev/disk/by-id/|grep sdb
lrwxrwxrwx 1 root root 10 Nov 28 10:50
usb-Corsair_Flash_Voyager_00000025000057-0:0-part1 -> ../../sdb1

robert at viper:~> sudo udevadm test /sys/block/sdb --action=add
>/dev/null 2>&1
robert at viper:~> ls -l /dev/disk/by-id/|grep sdb
lrwxrwxrwx 1 root root  9 Nov 28 11:34
usb-Corsair_Flash_Voyager_00000025000057-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Nov 28 10:50
usb-Corsair_Flash_Voyager_00000025000057-0:0-part1 -> ../../sdb1

 As you can see on action=remove, the link to sdb device node has been
 removed and on action=add, the link as been re-added.

 As I am running 'udevadm test', I would think, that this is only a test
 and the links or anything related to this test suppose to be fake,
 meaning nothing really should be removed/added.

 Is this a known functionality of 'udevadm test' or it's a bug?

-- 
Robert Milasan

L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmilasan at suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402  6FE7 2F64 167C 1909 6D1A


More information about the systemd-devel mailing list