From: Helge Deller <deller@gmx.de>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH] fcntl16.c patch
Date: Mon, 04 Nov 2013 22:05:04 +0100 [thread overview]
Message-ID: <52780C00.6010706@gmx.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
The fcntl16 testcase is being compiled twice, once normal, and the other
time with the _FILE_OFFSET_BITS=64 define set.
When compiled with 64bit file functions (as fcntl16_64) all
file functions will automatically use their 64bit variants, e.g.
"struct flock64" instead of "struct flock".
So, when in the code e.g.
fcntl(fd, F_SETLK, thislock)
is called, this will automatically be translated into
fcntl64(fd, F_SETLK64, thislock)
and "thislock" needs to be of type "struct flock64".
So, we need to make sure that thislock is of the correct type,
with the start and len fields being of type "off_t" which then
will be translated into "loff_t" during compilation when
_FILE_OFFSET_BITS=64 is set.
This fixes the fcntl16_64 testcase on hppa64-linux-gnu with
32bit userspace running on 64bit kernel.
Signed-off-by: Helge Deller <deller@gmx.de>
[-- Attachment #2: fcntl16.c.patch --]
[-- Type: text/x-patch, Size: 418 bytes --]
diff -up ./testcases/kernel/syscalls/fcntl/fcntl16.c.org ./testcases/kernel/syscalls/fcntl/fcntl16.c
--- ./testcases/kernel/syscalls/fcntl/fcntl16.c.org 2013-11-04 15:25:15.000000000 +0100
+++ ./testcases/kernel/syscalls/fcntl/fcntl16.c 2013-11-04 16:06:33.000000000 +0100
@@ -66,8 +66,8 @@
typedef struct {
short type;
short whence;
- long start;
- long len;
+ off_t start;
+ off_t len;
short flag;
} lock;
[-- Attachment #3: Type: text/plain, Size: 402 bytes --]
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next reply other threads:[~2013-11-04 21:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-04 21:05 Helge Deller [this message]
2013-11-06 12:32 ` [LTP] [PATCH] fcntl16.c patch chrubis
[not found] ` <527A964D.6030004@gmx.de>
2013-11-07 11:19 ` chrubis
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=52780C00.6010706@gmx.de \
--to=deller@gmx.de \
--cc=ltp-list@lists.sourceforge.net \
/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