[LTP] [PATCH] ltp: replace the retry loops by new exponential backoff macro

Shuang Qiu shuang.qiu@oracle.com
Fri Aug 10 09:04:51 CEST 2018


On 08/08/2018 03:35 PM, Li Wang wrote:
>
> Shuang Qiu <shuang.qiu@oracle.com <mailto:shuang.qiu@oracle.com>> wrote:
>
>     Oh,yes,Xiao's patch is related to it.
>     ===cut===
>     if tst_kvcmp -lt "2.6.35" && [ -n "$dev_file" ]; then
>     ===
>     But looks like the missing symlink issue is not only related with
>     kernel version or loop devices,but sometimes related with mkswap
>     version or udev rules.
>     The testcase sometimes will also fail with new version of kernels.
>
>
> Hmm, if that is true. We may need to rewrite the judgement according 
> the real situation.
>
> check_symlink_support()
> {
> if support symlink
>         return 0
> else
>         return 1
> }
>
> if ! check_symlink_support ; then
>         tst_res TINFO "Waiting for $dev_file to appear"
>         tst_sleep 100ms
> else
>         TST_RETRY_FUNC "check_for_file $dev_file" 0
> fi
>
> Or, any better idea?
Yes,this is a great solution.
But it is really hard to define the support symlink situation for 
different releases and userspace versions.
The simplest way is revert the patch for mkswap01

Thanks
Shuang
>
> -- 
> Regards,
> Li Wang


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20180810/78bf866a/attachment.html>


More information about the ltp mailing list