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 13/16] syscalls/sched_setscheduler02: convert to new API
Date: Mon, 9 Aug 2021 14:21:39 +0200	[thread overview]
Message-ID: <YREd08mkfysYkjzZ@yuki> (raw)
In-Reply-To: <20210806164730.51040-14-aleksei.kodanev@bell-sw.com>

Hi!
>  #define SCHED_INVALID	99
>  #define INVALID_PID	999999

I guess that we should remove these two unused macros as well.

> +	if (!pid) {
> +		struct sched_param p = { .sched_priority = 1 };
> +
> +		SAFE_SETEUID(nobody_uid);
> +		TST_EXP_FAIL(tv->sched_setscheduler(0, SCHED_FIFO, &p), EPERM,
> +			     "sched_setscheduler(0, SCHED_FIFO, %d)",
> +			     p.sched_priority);
> +		SAFE_SETEUID(0);

And we do not have to reset the UID before we call exit(0)

> +		exit(0);
> +	}
> +	tst_reap_children();
>  }

Other than that:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2021-08-09 12:21 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06 16:47 [LTP] [PATCH v2 00/16] syscalls/sched_*: convert to new API and handle ENOSYS errno Alexey Kodanev
2021-08-06 16:47 ` [LTP] [PATCH v2 01/16] lib/tst_sched: add ltp sys/libc_sched_*() wrappers Alexey Kodanev
2021-08-09  7:55   ` Li Wang
2021-08-09  9:53   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 02/16] syscalls/sched_getparam01: use libc/sys_sched_*() Alexey Kodanev
2021-08-09 10:02   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 03/16] syscalls/sched_getparam03: " Alexey Kodanev
2021-08-09 10:03   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 04/16] syscalls/sched_setparam01: convert to new API Alexey Kodanev
2021-08-09 10:05   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 05/16] syscalls/sched_setparam02: " Alexey Kodanev
2021-08-09 11:19   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 06/16] syscalls/sched_setparam03: " Alexey Kodanev
2021-08-09 11:28   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 07/16] syscalls/sched_setparam04: " Alexey Kodanev
2021-08-09 11:31   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 08/16] syscalls/sched_setparam05: " Alexey Kodanev
2021-08-09 11:34   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 09/16] syscalls/sched_rr_get_interval01: use sys_sched_*() Alexey Kodanev
2021-08-09 11:35   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 10/16] syscalls/sched_rr_get_interval02: " Alexey Kodanev
2021-08-09 11:36   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 11/16] syscalls/sched_rr_get_interval03: " Alexey Kodanev
2021-08-09 11:36   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 12/16] syscalls/sched_setscheduler01: convert to new API Alexey Kodanev
2021-08-09 12:19   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 13/16] syscalls/sched_setscheduler02: " Alexey Kodanev
2021-08-09 12:21   ` Cyril Hrubis [this message]
2021-08-06 16:47 ` [LTP] [PATCH v2 14/16] syscalls/sched_setscheduler03: use libc/sys_sched_*() Alexey Kodanev
2021-08-09 12:35   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 15/16] syscalls/sched_getscheduler01: convert to new API Alexey Kodanev
2021-08-09 12:39   ` Cyril Hrubis
2021-08-06 16:47 ` [LTP] [PATCH v2 16/16] syscalls/sched_getscheduler02: " Alexey Kodanev
2021-08-09 12:44   ` Cyril Hrubis
2021-08-12 13:51 ` [LTP] [PATCH v2 00/16] syscalls/sched_*: convert to new API and handle ENOSYS errno Alexey Kodanev

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=YREd08mkfysYkjzZ@yuki \
    --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