On Mon, Feb 01, 2016 at 04:38:17PM +0100, Stanislav Brabec wrote: > Karel Zak wrote: > > >I did some changes to the code: > > > > * use mnt_resolve_target() rather than mnt_resolve_spec() for target > > * move all to get_btrfs_fs_root() > > * make the basic if/else more readable > > By the way, I am just fixing next btrfs issue. Now it is in blkid. And it > seems, that I will need some changes in the code: move the btrfs default > subvol function into the public API, and change it to return the subvolid > string. Why we need the function in public API? Add subvolume ID to the probing result is no problem. It's just another NAME=value. > >It would be nice to have tests/ts/mount/btrfs with all the "mount -a" > >variants you have in commit messages. > > Are there any rules/framework for such tests that need root and editing of > /etc/fstab? See for example tests/ts/mount/fstab-devname, ts_skip_nonroot -- ignore the test for non-root user ts_fstab_add -- add line to the fstab the functions are implemented in tests/functions.sh > I think that use of losetup and /dev/loopX can be used for most testcases. I > am not sure about kernel partition table support inside loop devices. We use: ts_device_init -- for loop devies (uses truncate command) ts_scsi_debug_init -- for devices by scsi_debug kernel module scsi_debug is better solution, because it's absolutely without any side effects, but it's based on RAM, so create 10GiB disk is bad idea :) For more details see tests/ts/* with many many examples. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html