public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 1/4] lapi/sched.h: Add include <sched.h>
Date: Fri, 28 Jan 2022 14:32:38 +0100	[thread overview]
Message-ID: <YfPwdgiq7MDM7E8a@yuki> (raw)
In-Reply-To: <20220125144043.31798-2-pvorel@suse.cz>

Hi!
> We including headers in lapi headers instead of depending headers are
> included in tests which use lapi headers.

-ENOPARSE

The patch itself looks good though.

So maybe this should be something as:

Include <sched.h> and "lapi/syscalls.h" in "lapi/sched.h" instead of the
tests.

> Also remove redundant include lapi/syscalls.h from tests which use
> lapi/sched.h (included in lapi/sched.h).
> 
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> New in v2
> 
>  include/lapi/sched.h                                      | 3 ++-
>  testcases/kernel/syscalls/kcmp/kcmp03.c                   | 1 -
>  testcases/kernel/syscalls/sched_getattr/sched_getattr01.c | 2 --
>  testcases/kernel/syscalls/sched_getattr/sched_getattr02.c | 2 --
>  testcases/kernel/syscalls/sched_setattr/sched_setattr01.c | 1 -
>  5 files changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/include/lapi/sched.h b/include/lapi/sched.h
> index 036edd51d1..2fc32a38ca 100644
> --- a/include/lapi/sched.h
> +++ b/include/lapi/sched.h
> @@ -6,9 +6,10 @@
>  #ifndef LAPI_SCHED_H__
>  #define LAPI_SCHED_H__
>  
> -#include "lapi/syscalls.h"
> +#include <sched.h>
>  #include <stdint.h>
>  #include <inttypes.h>
> +#include "lapi/syscalls.h"
>  
>  struct sched_attr {
>  	uint32_t size;
> diff --git a/testcases/kernel/syscalls/kcmp/kcmp03.c b/testcases/kernel/syscalls/kcmp/kcmp03.c
> index 30ac3ec9db..df8633c5fc 100644
> --- a/testcases/kernel/syscalls/kcmp/kcmp03.c
> +++ b/testcases/kernel/syscalls/kcmp/kcmp03.c
> @@ -18,7 +18,6 @@
>  
>  #include <errno.h>
>  #include <stdlib.h>
> -#include <sched.h>
>  #include <sys/wait.h>
>  #include "tst_test.h"
>  #include "kcmp.h"
> diff --git a/testcases/kernel/syscalls/sched_getattr/sched_getattr01.c b/testcases/kernel/syscalls/sched_getattr/sched_getattr01.c
> index 2a2c13a40f..0ffbce9c8d 100644
> --- a/testcases/kernel/syscalls/sched_getattr/sched_getattr01.c
> +++ b/testcases/kernel/syscalls/sched_getattr/sched_getattr01.c
> @@ -22,11 +22,9 @@
>  #include <linux/types.h>
>  #include <sys/syscall.h>
>  #include <pthread.h>
> -#include <sched.h>
>  #include <errno.h>
>  
>  #include "test.h"
> -#include "lapi/syscalls.h"
>  #include "lapi/sched.h"
>  
>  char *TCID = "sched_getattr01";
> diff --git a/testcases/kernel/syscalls/sched_getattr/sched_getattr02.c b/testcases/kernel/syscalls/sched_getattr/sched_getattr02.c
> index 2d7e15a470..9f4a09f88f 100644
> --- a/testcases/kernel/syscalls/sched_getattr/sched_getattr02.c
> +++ b/testcases/kernel/syscalls/sched_getattr/sched_getattr02.c
> @@ -31,11 +31,9 @@
>  #include <linux/types.h>
>  #include <sys/syscall.h>
>  #include <pthread.h>
> -#include <sched.h>
>  #include <errno.h>
>  
>  #include "test.h"
> -#include "lapi/syscalls.h"
>  #include "lapi/sched.h"
>  
>  char *TCID = "sched_getattr02";
> diff --git a/testcases/kernel/syscalls/sched_setattr/sched_setattr01.c b/testcases/kernel/syscalls/sched_setattr/sched_setattr01.c
> index 37ca56a0aa..82156b95cb 100644
> --- a/testcases/kernel/syscalls/sched_setattr/sched_setattr01.c
> +++ b/testcases/kernel/syscalls/sched_setattr/sched_setattr01.c
> @@ -29,7 +29,6 @@
>  #include <linux/types.h>
>  #include <sys/syscall.h>
>  #include <pthread.h>
> -#include <sched.h>
>  #include <errno.h>
>  
>  #include "test.h"
> -- 
> 2.34.1
> 

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2022-01-28 13:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25 14:40 [LTP] [PATCH v2 0/4] sched_{g,s}etattr01: Add missing policies Petr Vorel
2022-01-25 14:40 ` [LTP] [PATCH v2 1/4] lapi/sched.h: Add include <sched.h> Petr Vorel
2022-01-28 13:32   ` Cyril Hrubis [this message]
2022-01-28 13:33     ` Cyril Hrubis
2022-01-28 15:19     ` Petr Vorel
2022-01-25 14:40 ` [LTP] [PATCH v2 2/4] lapi: Move SCHED_DEADLINE definition from tests Petr Vorel
2022-01-25 15:07   ` Cyril Hrubis
2022-01-25 14:40 ` [LTP] [PATCH v2 3/4] sched_get_priority_min01: Add missing policies Petr Vorel
2022-01-25 14:46   ` Petr Vorel
2022-01-25 14:48     ` Petr Vorel
2022-01-25 15:15   ` Cyril Hrubis
2022-01-25 14:40 ` [LTP] [PATCH v2 4/4] sched_get_priority_max01: " Petr Vorel
2022-01-25 15:26   ` Cyril Hrubis
2022-01-25 15:05 ` [LTP] [PATCH v2 0/4] sched_{g,s}etattr01: " Cyril Hrubis
2022-01-25 15:55   ` 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=YfPwdgiq7MDM7E8a@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@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