public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] syscalls/ioprio: Add test cases for I/O priority
Date: Thu, 18 Jul 2019 12:15:03 +0200	[thread overview]
Message-ID: <20190718101503.GA25712@rei.lan> (raw)
In-Reply-To: <20190718100848.GA24931@rei.lan>

Hi!
> > +	/* Bump to best effort scheduling, all 8 priorities */
> > +	class = IOPRIO_CLASS_BE;
> > +
> > +	fail_in_loop = 0;
> > +	for (prio = 0; prio < 8; prio++) {
> > +		TEST(ioprio_set(IOPRIO_WHO_PROCESS, 0,
> > +				IOPRIO_PRIO_VALUE(class, prio)));
> > +		if (TST_RET == -1) {
> > +			tst_res(TFAIL | TTERRNO, "ioprio_set IOPRIO_CLASS_BE prio %d failed", prio);
> > +			fail_in_loop = 1;
> > +		}
> > +	}
> > +	if (!fail_in_loop)
> > +		tst_res(TPASS, "tested all 8 prios in class %s",
> > +			 to_class_str[class]);
> 
> Just btw, we don't have to have the fail_in_loop variable here
> (fail_in_loop) == (prio < 8)

And that only works when we have a break; on failure, which we don't
have here...

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2019-07-18 10:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-18  7:39 [LTP] [PATCH v2] syscalls/ioprio: Add test cases for I/O priority Linus Walleij
2019-07-18 10:09 ` Cyril Hrubis
2019-07-18 10:15   ` Cyril Hrubis [this message]
2019-07-22  9:04 ` Christian Amann

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=20190718101503.GA25712@rei.lan \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox