From: Ben Hutchings <ben-/+tVBieCtBitmTQ+vhA3Yw@public.gmane.org>
To: Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
Cc: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH selftests 1/6] selftests: Add missing #include directives
Date: Sat, 31 Oct 2015 23:36:43 +0000 [thread overview]
Message-ID: <1446334603.2595.14.camel@decadent.org.uk> (raw)
In-Reply-To: <1446334510.2595.13.camel-/+tVBieCtBitmTQ+vhA3Yw@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2332 bytes --]
Several C programs fail to include the headers declaring all the
functions they call, resulting in warnings or errors.
After this, memfd_test.c is still missing some function declarations
but can't easily get them because of a conflict between
<linux/fcntl.h> and <sys/fcntl.h>.
Signed-off-by: Ben Hutchings <ben-/+tVBieCtBitmTQ+vhA3Yw@public.gmane.org>
---
tools/testing/selftests/memfd/memfd_test.c | 1 +
tools/testing/selftests/mqueue/mq_open_tests.c | 1 +
tools/testing/selftests/mqueue/mq_perf_tests.c | 1 +
tools/testing/selftests/timers/nanosleep.c | 1 +
4 files changed, 4 insertions(+)
diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c
index 0b9eafb..5347ef6 100644
--- a/tools/testing/selftests/memfd/memfd_test.c
+++ b/tools/testing/selftests/memfd/memfd_test.c
@@ -15,6 +15,7 @@
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/syscall.h>
+#include <sys/wait.h>
#include <unistd.h>
#define MFD_DEF_SIZE 8192
diff --git a/tools/testing/selftests/mqueue/mq_open_tests.c b/tools/testing/selftests/mqueue/mq_open_tests.c
index 9c1a5d35..e0a74bd 100644
--- a/tools/testing/selftests/mqueue/mq_open_tests.c
+++ b/tools/testing/selftests/mqueue/mq_open_tests.c
@@ -31,6 +31,7 @@
#include <sys/resource.h>
#include <sys/stat.h>
#include <mqueue.h>
+#include <error.h>
static char *usage =
"Usage:\n"
diff --git a/tools/testing/selftests/mqueue/mq_perf_tests.c b/tools/testing/selftests/mqueue/mq_perf_tests.c
index 8519e9e..8188f72 100644
--- a/tools/testing/selftests/mqueue/mq_perf_tests.c
+++ b/tools/testing/selftests/mqueue/mq_perf_tests.c
@@ -37,6 +37,7 @@
#include <sys/stat.h>
#include <mqueue.h>
#include <popt.h>
+#include <error.h>
static char *usage =
"Usage:\n"
diff --git a/tools/testing/selftests/timers/nanosleep.c b/tools/testing/selftests/timers/nanosleep.c
index 8a3c29d..ff942ff 100644
--- a/tools/testing/selftests/timers/nanosleep.c
+++ b/tools/testing/selftests/timers/nanosleep.c
@@ -19,6 +19,7 @@
* GNU General Public License for more details.
*/
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
--
Ben Hutchings
All extremists should be taken out and shot.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next prev parent reply other threads:[~2015-10-31 23:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-31 23:35 [PATCH selftests 0/6] Fix some broken tests Ben Hutchings
[not found] ` <1446334510.2595.13.camel-/+tVBieCtBitmTQ+vhA3Yw@public.gmane.org>
2015-10-31 23:36 ` Ben Hutchings [this message]
2015-10-31 23:37 ` [PATCH selftests 2/6] selftests: memfd: Stop unnecessary rebuilds Ben Hutchings
2015-10-31 23:37 ` [PATCH selftests 3/6] selftests: kprobe: Choose an always-defined function to probe Ben Hutchings
2015-10-31 23:37 ` [PATCH selftests 4/6] selftests: Make scripts executable Ben Hutchings
2015-10-31 23:39 ` [PATCH selftests 5/6] selftests: vm: Try harder to allocate huge pages Ben Hutchings
[not found] ` <1446334747.2595.19.camel-/+tVBieCtBitmTQ+vhA3Yw@public.gmane.org>
2015-11-10 20:01 ` David Rientjes
[not found] ` <alpine.DEB.2.10.1511101159480.29993-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2015-11-10 20:05 ` Shuah Khan
2015-11-10 21:48 ` Ben Hutchings
2015-11-11 1:11 ` David Rientjes
2015-10-31 23:39 ` [PATCH selftests 6/6] selftests: breakpoint: Actually build it Ben Hutchings
2015-11-02 12:15 ` [PATCH selftests 0/6] Fix some broken tests Ben Hutchings
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=1446334603.2595.14.camel@decadent.org.uk \
--to=ben-/+tvbiectbitmtq+vha3yw@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.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 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).