public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 3/3] dio_sparse: Fix child exit code
Date: Wed, 14 Sep 2022 11:49:43 +0200	[thread overview]
Message-ID: <YyGjt23DZS8M4Ryx@yuki> (raw)
In-Reply-To: <a6fbe570-109d-a7f8-1a56-99791fcdd7b4@suse.cz>

Hi!
> > Ah, this is the fix. I would go for tst_res(TFAIL, ""); and return 1;
> > otherwise this looks fine applied over the previous changes.
> 
> If I returned from io_read(), I'd have to rewrite the calls in 
> dio_sparse.c and aiodio_sparse.c to exit(io_read()). Otherwise testrun() 
> in LTP library would always force the exit code to 0. This is less work 
> and you won't need to remember LTP library implementation details when 
> you reuse io_read() in a new test.

What about tst_res(TFAIL, ""); followed by exit(1). Really this is a
case where the test does fail we and we should report failure properly.
Or even just exit(1) as we do check the exit value after your changes.

> Should I send a v2 for tst_validate_children() or will you delete the 
> if(WCOREDUMP()) branch and merge it now?

Is there a good reason why you are trying to avoid tst_strstatus() that
simplifies the whole inner body of the loop to a single if?

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2022-09-14  9:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13 15:19 [LTP] [PATCH 0/3] Fix ADSP074 timeouts Martin Doucha
2022-09-13 15:19 ` [LTP] [PATCH 1/3] Add tst_validate_children() helper function Martin Doucha
2022-09-14  9:12   ` Cyril Hrubis
2022-09-13 15:19 ` [LTP] [PATCH 2/3] Make io_read() runtime-aware Martin Doucha
2022-09-14  9:36   ` Cyril Hrubis
2022-09-13 15:19 ` [LTP] [PATCH 3/3] dio_sparse: Fix child exit code Martin Doucha
2022-09-14  9:37   ` Cyril Hrubis
2022-09-14  9:44     ` Martin Doucha
2022-09-14  9:49       ` Cyril Hrubis [this message]
2022-09-14  9:49         ` Martin Doucha

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=YyGjt23DZS8M4Ryx@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mdoucha@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox