All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Wang <liwang@redhat.com>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: LTP List <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH 1/2] ioctl09: wait for udevd complete the uevent handling
Date: Wed, 20 Apr 2022 20:31:23 +0800	[thread overview]
Message-ID: <CAEemH2dTCBpynB3wj_8eTVvvJR_V4fGPZNvt_35noqdykKi52g@mail.gmail.com> (raw)
In-Reply-To: <Yl/3FchHScs8YS6c@yuki>


[-- Attachment #1.1: Type: text/plain, Size: 1924 bytes --]

Cyril Hrubis <chrubis@suse.cz> wrote:



>
> >  static void verify_ioctl(void)
> >  {
> > +     char cmd[BUFSIZ];
> > +
> > +     sprintf(cmd, "udevadm settle --exit-if-exists=%s", dev_path);
> > +
> >       const char *const cmd_parted_old[] = {"parted", "-s", "test.img",
> >                                             "mklabel", "msdos", "mkpart",
> >                                             "primary", "ext4", "1M",
> "10M",
> > @@ -75,11 +79,13 @@ static void verify_ioctl(void)
> >
> >       loopinfo.lo_flags =  LO_FLAGS_PARTSCAN;
> >       SAFE_IOCTL(dev_fd, LOOP_SET_STATUS, &loopinfo);
> > +     tst_system(cmd);
> >       check_partition(1, true);
> >       check_partition(2, false);
> >
> >       change_partition(cmd_parted_new);
> >       TST_RETRY_FUNC(ioctl(dev_fd, BLKRRPART, 0), TST_RETVAL_EQ0);
> > +     tst_system(cmd);
> >       check_partition(1, true);
> >       check_partition(2, true);
>
> We allready use TST_RETRY_FN_EXP_BACKOFF() in there with 30 second
>

I have to say, for most systems 30 sec is long enough, but we definitely got
sporadically fails in larger-scale automation testing.


timeout isn't that enough? And if it isn't wouldn't simply increasing
> the timeout to a minute or two fix the issue?
>


That should be better, I just have a try on my reproducible system,
but it does not work with enlarged to 180 seconds.

ioctl09.c:52: TPASS: access /dev/loop0p1 succeeds
octl09.c:47: TFAIL: access /sys/block/loop0/loop0p2 fails
Test timeouted, sending SIGKILL!
tst_test.c:1509: TINFO: If you are running on slow machine, try exporting
LTP_TIMEOUT_MUL > 1
tst_test.c:1511: TBROK: Test killed! (timeout?)


Note, the `udevadm settle` uses 180s as default timeout as well,
but it can work, I will look into udevadm.c to see if that does
something additional besides the waiting.

If so, we might need to remove the TST_RETRY_FN_EXP_BACKOFF
from this test.

-- 
Regards,
Li Wang

[-- Attachment #1.2: Type: text/html, Size: 4384 bytes --]

[-- Attachment #2: Type: text/plain, Size: 60 bytes --]


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-04-20 12:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 11:47 [LTP] [PATCH 1/2] ioctl09: wait for udevd complete the uevent handling Li Wang
2022-04-20 11:47 ` [LTP] [PATCH 2/2] mkswap01: wait for the triggered events to complete Li Wang
2022-04-20 12:07   ` Cyril Hrubis
2022-04-20 20:56   ` Petr Vorel
2022-04-21  2:18     ` Li Wang
2022-04-21  6:44       ` Li Wang
2022-04-21  7:47         ` Petr Vorel
2022-04-20 12:05 ` [LTP] [PATCH 1/2] ioctl09: wait for udevd complete the uevent handling Cyril Hrubis
2022-04-20 12:31   ` Li Wang [this message]
2022-04-20 12:52     ` Cyril Hrubis
2022-04-21  6:36       ` Li Wang

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=CAEemH2dTCBpynB3wj_8eTVvvJR_V4fGPZNvt_35noqdykKi52g@mail.gmail.com \
    --to=liwang@redhat.com \
    --cc=chrubis@suse.cz \
    --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.