All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3] Test ioctl syscall for NS_GET_* requests
Date: Tue, 26 Mar 2019 20:20:52 +0100	[thread overview]
Message-ID: <20190326192052.GA15776@rei.lan> (raw)
In-Reply-To: <20190319180944.3933-1-fedebonfi95@gmail.com>

Hi!
> Hi Cyril, thanks for your patience. From what I understood, all the
> /proc/self/ns/* files exist if the kernel is compiled with namespaces.
> So only one of them has to be checked for each test, making additional
> checks for other processes namespaces symlinks redundant. If this is
> true, here's the updated patch, otherwise I'll add all the other
> checks for child processes.

This version looks very good, two minor comments below.

> I also changed the TCONF message in ioctl_ns08.c from "namespace not
> available" to "can't access current directory" since "." isn't a
> namespace, and we are trying to open a file that's not a namespace.

I would have just dropped the check for availability of ".", there is no
point of making sure that "." is a correct directory as it's higly
unlikely that the check will fail.

>  include/lapi/ioctl_ns.h                      | 28 ++++++++++
>  include/tst_safe_macros.h                    |  4 ++
>  lib/tst_safe_macros.c                        | 17 ++++++
>  runtest/syscalls                             |  8 +++
>  testcases/kernel/syscalls/ioctl/.gitignore   |  7 +++
>  testcases/kernel/syscalls/ioctl/ioctl_ns01.c | 65 +++++++++++++++++++++++
>  testcases/kernel/syscalls/ioctl/ioctl_ns02.c | 49 +++++++++++++++++
>  testcases/kernel/syscalls/ioctl/ioctl_ns04.c | 50 ++++++++++++++++++
>  testcases/kernel/syscalls/ioctl/ioctl_ns05.c | 48 +++++++++++++++++
>  testcases/kernel/syscalls/ioctl/ioctl_ns06.c | 77 +++++++++++++++++++++++++++
>  testcases/kernel/syscalls/ioctl/ioctl_ns07.c | 78 ++++++++++++++++++++++++++++
>  testcases/kernel/syscalls/ioctl/ioctl_ns08.c | 57 ++++++++++++++++++++
>  12 files changed, 488 insertions(+)
>  create mode 100644 include/lapi/ioctl_ns.h
>  create mode 100644 testcases/kernel/syscalls/ioctl/ioctl_ns01.c
>  create mode 100644 testcases/kernel/syscalls/ioctl/ioctl_ns02.c
>  create mode 100644 testcases/kernel/syscalls/ioctl/ioctl_ns04.c
>  create mode 100644 testcases/kernel/syscalls/ioctl/ioctl_ns05.c
>  create mode 100644 testcases/kernel/syscalls/ioctl/ioctl_ns06.c
>  create mode 100644 testcases/kernel/syscalls/ioctl/ioctl_ns07.c
>  create mode 100644 testcases/kernel/syscalls/ioctl/ioctl_ns08.c

Can we please split this patch and add the safe macro in a separate
patch?

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2019-03-26 19:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-24 20:29 [LTP] [PATCH v1] Test ioctl syscall for NS_GET_* requests YourName
2019-03-04 16:16 ` Cyril Hrubis
2019-03-11  7:25   ` [LTP] [PATCH v2] " Federico Bonfiglio
2019-03-18 14:22     ` Cyril Hrubis
2019-03-18 15:30     ` Cyril Hrubis
2019-03-19 18:09       ` [LTP] [PATCH v3] " Federico Bonfiglio
2019-03-26 19:20         ` Cyril Hrubis [this message]
2019-03-28 20:22           ` [LTP] [PATCH v4 1/2] include/SAFE_UNSHARE() macro added Federico Bonfiglio
2019-04-03 15:19             ` Cyril Hrubis
2019-03-28 20:22           ` [LTP] [PATCH v4 2/2] Test ioctl syscall for NS_GET_* requests Federico Bonfiglio
2019-04-03 15:22             ` Cyril Hrubis
2019-04-11 19:25               ` [LTP] [PATCH v5] " Federico Bonfiglio
2019-04-12 14:33                 ` Cyril Hrubis
2019-05-06 10:14                   ` [LTP] NS_* ioctl commands fail in 32bit compat mode (-m32) Richard Palethorpe
2019-05-06 10:39                     ` Richard Palethorpe
2019-05-13  9:00                       ` Cyril Hrubis

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=20190326192052.GA15776@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 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.