[LTP] [PATCH ltp] fs/ext4: enhance logic of ext4_nsec_timestamps_test
Cyril Hrubis
chrubis@suse.cz
Thu May 3 12:24:12 CEST 2018
Hi!
> > 2. Add "sleep 1" between mount and umount, to avoid umount failed due to
> > device busy (accessed by system service like systemd-udev)
>
> NACK to this.
>
> In a case that we need to wait for something like this we are supposed
> to retry in a loop with exponential backoff, which is usually faster
> than hardcoded sleep but also more robust.
>
> There is a in-flight patch for adding TST_RETRY_FUNC function to the
> shell library "[PATCH] tst_test.sh: achieve TST_RETRY_FUNC function in shell"
> which should make this really easy but we would have to add it to the
> old shell test library as well so that we can reuse it here.
And I remebered that we already solved this by adding tst_umount
function to the shell library. The systemd-udev is not first daemon to
probe newly mounted filesystem, we used to have this kind of problems
with gvfsd-trash as well.
So fixing this should be as easy as replacing the umount with tst_umount
function.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list