linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: "open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"skh >> Shuah Khan" <skhan@linuxfoundation.org>
Subject: Linux 5.5=rc1 kselftest rseq test build failure
Date: Tue, 10 Dec 2019 17:27:44 -0700	[thread overview]
Message-ID: <2d53b409-31e0-2245-e163-1ab26f52c841@linuxfoundation.org> (raw)

Hi Mathieu,

I am seeing rseq test build failure on Linux 5.5-rc1.

gcc -O2 -Wall -g -I./ -I../../../../usr/include/ -L./ -Wl,-rpath=./ 
param_test.c -lpthread -lrseq -o ...tools/testing/selftests/rseq/param_test
param_test.c:18:21: error: static declaration of ‘gettid’ follows 
non-static declaration
    18 | static inline pid_t gettid(void)
       |                     ^~~~~~
In file included from /usr/include/unistd.h:1170,
                  from param_test.c:11:
/usr/include/x86_64-linux-gnu/bits/unistd_ext.h:34:16: note: previous 
declaration of ‘gettid’ was here
    34 | extern __pid_t gettid (void) __THROW;
       |                ^~~~~~
make: *** [Makefile:28: ...tools/testing/selftests/rseq/param_test] Error 1


The following obvious change fixes it. However, there could be reason
why this was defined here. If you think this is the right fix, I can
send the patch. I started seeing this with gcc version 9.2.1 20191008

diff --git a/tools/testing/selftests/rseq/param_test.c 
b/tools/testing/selftests/rseq/param_test.c
index eec2663261f2..18a0fa1235a7 100644
--- a/tools/testing/selftests/rseq/param_test.c
+++ b/tools/testing/selftests/rseq/param_test.c
@@ -15,11 +15,6 @@
  #include <errno.h>
  #include <stddef.h>

-static inline pid_t gettid(void)
-{
-       return syscall(__NR_gettid);
-}
-

thanks,
-- Shuah

             reply	other threads:[~2019-12-11  0:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11  0:27 Shuah Khan [this message]
2019-12-11 15:19 ` Linux 5.5=rc1 kselftest rseq test build failure Mathieu Desnoyers
2019-12-11 15:45   ` Shuah Khan

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=2d53b409-31e0-2245-e163-1ab26f52c841@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.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;
as well as URLs for NNTP newsgroup(s).