From: "Thierry Fauck ( thierry @ linux.vnet.ibm.com )" <thierry@linux.vnet.ibm.com>
To: benh@kernel.crashing.org-, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH] selftests: PAGE_SIZE may not be defined
Date: Thu, 15 May 2014 18:02:58 +0200 [thread overview]
Message-ID: <5374E532.10002@linux.vnet.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1495 bytes --]
Hi Ben,
The following patch seems relevant for Ubuntu and Debian distro testing.
I know it's minor but I need to know if you do you care about it or sif
I should remove it from the bugs info.
Thanks
Best regards
Thierry
#---------------------------------------------------------------------------------------------------
>From 48a9a9834377a74b603be12dcc76cda24105e33c Mon Sep 17 00:00:00 2001
From: Thierry Fauck <thierry@linux.vnet.ibm.com>
Date: Fri, 28 Feb 2014 16:17:50 +0100
Subject: [PATCH] selftests: PAGE_SIZE may not be defined
Some systems have a dynamic PAGE_SIZE value and do not add a definition
for PAGE_SIZE. This value will have to be retrieved using getpagesize()
or sysconf().
Signed-off-by: Thierry Fauck <thierry@linux.vnet.ibm.com>
---
tools/testing/selftests/ptrace/peeksiginfo.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/ptrace/peeksiginfo.c
b/tools/testing/selftests/ptrace/peeksiginfo.c
index d46558b..f2ccbbd 100644
--- a/tools/testing/selftests/ptrace/peeksiginfo.c
+++ b/tools/testing/selftests/ptrace/peeksiginfo.c
@@ -35,7 +35,9 @@ static int sys_ptrace(int request, pid_t pid, void
*addr, void *data)
fprintf(stderr, \
"Error (%s:%d): " fmt, \
__FILE__, __LINE__, ##__VA_ARGS__)
-
+#ifndef PAGE_SIZE
+#define PAGE_SIZE sysconf(_SC_PAGESIZE)
+#endif
static int check_error_paths(pid_t child)
{
struct ptrace_peeksiginfo_args arg;
--
1.9.0
--
Thierry Fauck (thierry@linux.vnet.ibm.com)
[-- Attachment #2: Type: text/html, Size: 2508 bytes --]
next reply other threads:[~2014-05-15 16:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-15 16:02 Thierry Fauck ( thierry @ linux.vnet.ibm.com ) [this message]
2014-05-20 0:29 ` [PATCH] selftests: PAGE_SIZE may not be defined Benjamin Herrenschmidt
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=5374E532.10002@linux.vnet.ibm.com \
--to=thierry@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org- \
--cc=linuxppc-dev@lists.ozlabs.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).