All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	jaswinder.singh@linaro.org
Subject: [BUGFIX PATCH] selftests/x86: Check the availablity of sys/syscall.h
Date: Mon, 25 Nov 2019 20:03:44 +0900	[thread overview]
Message-ID: <157467982420.24866.4375165389279465782.stgit@devnote2> (raw)

Since single_step_syscall.c depends on sys/syscall.h and
its include, asm/unistd.h, we should check the availability
of those headers.
Without this fix, if gcc-multilib is not installed but
libc6-dev-i386 is installed, kselftest tries to build 32bit
binary and failed with following error message.

In file included from single_step_syscall.c:18:
/usr/include/sys/syscall.h:24:10: fatal error: asm/unistd.h: No such file or directory
 #include <asm/unistd.h>
          ^~~~~~~~~~~~~~
compilation terminated.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
 .../testing/selftests/x86/trivial_32bit_program.c  |    1 +
 .../testing/selftests/x86/trivial_64bit_program.c  |    1 +
 2 files changed, 2 insertions(+)

diff --git a/tools/testing/selftests/x86/trivial_32bit_program.c b/tools/testing/selftests/x86/trivial_32bit_program.c
index aa1f58c2f71c..6b455eda24f7 100644
--- a/tools/testing/selftests/x86/trivial_32bit_program.c
+++ b/tools/testing/selftests/x86/trivial_32bit_program.c
@@ -8,6 +8,7 @@
 # error wrong architecture
 #endif
 
+#include <sys/syscall.h>
 #include <stdio.h>
 
 int main()
diff --git a/tools/testing/selftests/x86/trivial_64bit_program.c b/tools/testing/selftests/x86/trivial_64bit_program.c
index 39f4b84fbf15..07ae86df18ff 100644
--- a/tools/testing/selftests/x86/trivial_64bit_program.c
+++ b/tools/testing/selftests/x86/trivial_64bit_program.c
@@ -8,6 +8,7 @@
 # error wrong architecture
 #endif
 
+#include <sys/syscall.h>
 #include <stdio.h>
 
 int main()


             reply	other threads:[~2019-11-25 11:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 11:03 Masami Hiramatsu [this message]
2019-12-05  8:28 ` [BUGFIX PATCH] selftests/x86: Check the availablity of sys/syscall.h Masami Hiramatsu

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=157467982420.24866.4375165389279465782.stgit@devnote2 \
    --to=mhiramat@kernel.org \
    --cc=jaswinder.singh@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    /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.