public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: Martin Doucha <martin.doucha@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] lib: tst_fd: Avoid tst_brk(TCONF, ...) on older distros
Date: Wed, 24 Jan 2024 15:25:31 +0100	[thread overview]
Message-ID: <20240124142531.GA304067@pevik> (raw)
In-Reply-To: <ZbEc3IMfG1d_bm4t@yuki>

> Hi!
> > Actually at least here tst_syscall() needs to be called or it fails on older
> > distros due missing ENOSYS check in raw syscall():

> Ah, no we have to handle the ENOSYS ourselves as we do in the other
> cases. Sorry for not realizing that.

> We likely need just:

Yes, I also realized that when I double check your commit message.

Kind regards,
Petr

> diff --git a/lib/tst_fd.c b/lib/tst_fd.c
> index ab7de81aa..8b26ff8e5 100644
> --- a/lib/tst_fd.c
> +++ b/lib/tst_fd.c
> @@ -141,7 +141,7 @@ static void open_pidfd(struct tst_fd *fd)
>  {
>         fd->fd = syscall(__NR_pidfd_open, getpid(), 0);
>         if (fd->fd < 0)
> -               tst_brk(TBROK | TERRNO, "pidfd_open()");
> +               tst_res(TCONF | TERRNO, "pidfd_open()");
>  }


> The tst_sycall() can't be called there at all _because_ it calls
> tst_brk() itself.

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

  reply	other threads:[~2024-01-24 14:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 12:58 [LTP] [PATCH] lib: tst_fd: Avoid tst_brk(TCONF, ...) on older distros Cyril Hrubis
2024-01-24 13:54 ` Martin Doucha
2024-01-24 14:10 ` Petr Vorel
2024-01-24 14:11   ` Cyril Hrubis
2024-01-24 14:22     ` Petr Vorel
2024-01-24 14:16 ` Petr Vorel
2024-01-24 14:21   ` Cyril Hrubis
2024-01-24 14:25     ` Petr Vorel [this message]
2024-01-24 14:36     ` Martin Doucha
2024-01-24 14:56       ` Petr Vorel
2024-01-24 15:19         ` Cyril Hrubis
2024-01-24 15:50           ` Petr Vorel
2024-01-24 16:57           ` 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=20240124142531.GA304067@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=martin.doucha@suse.com \
    /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