All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v6 1/2] safe_macros: Use tst_umount() in safe_umount()
Date: Mon, 10 Feb 2020 03:19:12 -0500 (EST)	[thread overview]
Message-ID: <748200464.6799894.1581322752135.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20200207155730.GB16951@rei.lan>



----- Original Message -----
> Hi!
> > > My expectation is that retrying on EBUSY will not break anything. Jan
> > > what do you think?
> > 
> > I agree. Though I'd like to point out that tst_umount() currently loops
> > on any error, not just EBUSY.
> 
> Right, I guess that we should change that to be on the safe side, it was
> never intended to retry anything else than EBUSY.
> 
> What about?
> 
> diff --git a/lib/tst_device.c b/lib/tst_device.c
> index 89b9c96de..52a5b37fd 100644
> --- a/lib/tst_device.c
> +++ b/lib/tst_device.c
> @@ -371,6 +371,9 @@ int tst_umount(const char *path)
>                                  "mounted fs, kill it to speed up tests.");
>                 }
>  
> +               if (err != EBUSY) {
> +                       errno = err;
> +                       return ret;
> +               }
> +
>                 usleep(100000);
>         }

Works for me too, I don't recall seeing anything else than EBUSY.


  parent reply	other threads:[~2020-02-10  8:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 14:41 [LTP] [PATCH v6 1/2] safe_macros: Use tst_umount() in safe_umount() Petr Vorel
2020-02-07 14:41 ` [LTP] [PATCH v6 2/2] syscalls/fsmount01: Add test for new mount API v5.2 Petr Vorel
2020-02-16  7:32   ` Li Wang
2020-02-16 13:17     ` Petr Vorel
2020-02-17  6:48       ` Li Wang
2020-02-17  7:51         ` Petr Vorel
2020-02-17  9:16         ` Jan Stancek
2020-02-17  9:43           ` Petr Vorel
2020-02-17  7:17       ` Li Wang
2020-02-17  8:04     ` Viresh Kumar
2020-02-07 15:24 ` [LTP] [PATCH v6 1/2] safe_macros: Use tst_umount() in safe_umount() Cyril Hrubis
2020-02-07 15:47   ` Jan Stancek
2020-02-07 15:53     ` Petr Vorel
2020-02-07 15:56       ` Jan Stancek
2020-02-07 15:57     ` Cyril Hrubis
2020-02-07 16:10       ` Petr Vorel
2020-02-10  8:19       ` Jan Stancek [this message]
2020-02-10 12:44         ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=748200464.6799894.1581322752135.JavaMail.zimbra@redhat.com \
    --to=jstancek@redhat.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.