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 2/3] tst_device.h: Use lapi/syscalls.h instead of <sys/syscall.h>
Date: Mon, 20 Jan 2020 13:28:15 +0100	[thread overview]
Message-ID: <20200120122814.GA21132@rei.lan> (raw)
In-Reply-To: <558281761.2778139.1579517819187.JavaMail.zimbra@redhat.com>

Hi!
> > Example of the error is #634 [1], which is caused by __NR_socketcall being -1
> > instead of not defined (socketcall is not defined on some archs, e.g. x86-64
> > and ARM).
> > We can fix the condition
> 
> Tests using tst_syscall or ltp_syscall should be fine, since those check
> for ENOSYS.
> 
> >, but it will lead to numerous not obvious errors, so
> > I
> > suggest to revert this (and thus get LTP broken on very old distros).
> > 
> 
> Cyril, any thoughts?

I would say that doing #ifdef __NR_* in test source to disable it is
wrong to begin with.

Doing 'git grep ifdef __NR' shows only socketcall, set_robust_list and
timerfd tests.

The timerfd tests include lapi/syscalls.h already and uses ltp_syscall()
so that shouldn't break. I guess we can safely remove the ifdef there as
well.

The set_robust_list includes the old test.h so thi change to
tst_device.h should not affect it either.

So as far as I can tell the only thing that breaks are the socketcall
tests and I guess that the actual fix would be using tst_syscall()
instead of syscall() and we can remove the ifdefs as well.

-- 
Cyril Hrubis
chrubis@suse.cz

  parent reply	other threads:[~2020-01-20 12:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17 11:37 [LTP] [PATCH 0/3] Fixes for old distros Petr Vorel
2020-01-17 11:37 ` [LTP] [PATCH 1/3] pidfd_send_signal: Build with _GNU_SOURCE Petr Vorel
2020-01-17 11:37 ` [LTP] [PATCH 2/3] tst_device.h: Use lapi/syscalls.h instead of <sys/syscall.h> Petr Vorel
2020-01-20 10:31   ` Petr Vorel
2020-01-20 10:56     ` Jan Stancek
2020-01-20 12:03       ` Petr Vorel
2020-01-20 12:30         ` Martin Doucha
2020-01-20 13:04           ` Petr Vorel
2020-01-20 12:28       ` Cyril Hrubis [this message]
2020-01-17 11:37 ` [LTP] [PATCH 3/3] lapi/syscalls: Add syncfs Petr Vorel
2020-01-17 12:15 ` [LTP] [PATCH 0/3] Fixes for old distros Jan Stancek
2020-01-17 15:53   ` 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=20200120122814.GA21132@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