All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] Fix fallocate() build issue for EXT4 Online Defragmentation Test
@ 2010-03-24 13:36 Subrata Modak
  2010-03-24 17:48 ` Garrett Cooper
  0 siblings, 1 reply; 5+ messages in thread
From: Subrata Modak @ 2010-03-24 13:36 UTC (permalink / raw)
  To: Garrett Cooper, Miao Xie; +Cc: LTP Mailing List

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

Earlier Subject: Re: [LTP] ext4/e4defrag.c testcases compilation error,

Hi Garret/Miao,

On PPC systems, fallocate() seems to be already defined at /usr/include/bits/fcntl.h,
so building EXT4 test cases on PPC64 machines will create build problems even if the
pre-requisite packages:

e2fsprogs*
e2fsprogs-libs*
e2fsprogs-devel*

are present. So, this patch adds an extra check. Please let me know your thoughts.

Errors bound to occur:
[
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall  -I/root/subrata/ltp/ltp-dev/testcases/kernel/include -I../../../../../include -I../../../../../include   -L../../../../../lib  e4defrag.c   -lltp -lm -o e4defrag
e4defrag.c:388: error: conflicting types for ���fallocate���
/usr/include/bits/fcntl.h:240: note: previous declaration of ���fallocate��� was here
make[1]: *** [e4defrag] Error 1
]

Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
---

--- ltp-dev/testcases/kernel/fs/ext4-new-features/ext4-online-defrag/e4defrag.c	2010-03-15 19:32:12.000000000 +0530
+++ ltp-dev.modified/testcases/kernel/fs/ext4-new-features/ext4-online-defrag/e4defrag.c	2010-03-24 18:09:14.336793513 +0530
@@ -383,10 +383,13 @@ int sync_file_range(int fd, loff_t offse
  * @offset:		file offset.
  * @len:		file size.
  */
+
+#ifndef __NR_fallocate
 int fallocate(int fd, int mode, loff_t offset, loff_t len)
 {
 	return syscall(__NR_fallocate, fd, mode, offset, len);
 }
+#endif
 
 /*
  * get_mount_point() -	Get device's mount point.

---
Regards--
Subrata Modak



[-- Attachment #2: Type: text/plain, Size: 345 bytes --]

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] Fix fallocate() build issue for EXT4 Online Defragmentation Test
  2010-03-24 13:36 [LTP] [PATCH] Fix fallocate() build issue for EXT4 Online Defragmentation Test Subrata Modak
@ 2010-03-24 17:48 ` Garrett Cooper
  2010-03-25 18:56   ` Subrata Modak
  0 siblings, 1 reply; 5+ messages in thread
From: Garrett Cooper @ 2010-03-24 17:48 UTC (permalink / raw)
  To: Subrata Modak; +Cc: LTP Mailing List, Miao Xie

On Wed, Mar 24, 2010 at 6:36 AM, Subrata Modak
<subrata@linux.vnet.ibm.com> wrote:
> Earlier Subject: Re: [LTP] ext4/e4defrag.c testcases compilation error,
>
> Hi Garret/Miao,
>
> On PPC systems, fallocate() seems to be already defined at /usr/include/bits/fcntl.h,
> so building EXT4 test cases on PPC64 machines will create build problems even if the
> pre-requisite packages:
>
> e2fsprogs*
> e2fsprogs-libs*
> e2fsprogs-devel*
>
> are present. So, this patch adds an extra check. Please let me know your thoughts.
>
> Errors bound to occur:
> [
> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall  -I/root/subrata/ltp/ltp-dev/testcases/kernel/include -I../../../../../include -I../../../../../include   -L../../../../../lib  e4defrag.c   -lltp -lm -o e4defrag
> e4defrag.c:388: error: conflicting types for ‘fallocate’
> /usr/include/bits/fcntl.h:240: note: previous declaration of ‘fallocate’ was here
> make[1]: *** [e4defrag] Error 1
> ]
>
> Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
> ---
>
> --- ltp-dev/testcases/kernel/fs/ext4-new-features/ext4-online-defrag/e4defrag.c 2010-03-15 19:32:12.000000000 +0530
> +++ ltp-dev.modified/testcases/kernel/fs/ext4-new-features/ext4-online-defrag/e4defrag.c        2010-03-24 18:09:14.336793513 +0530
> @@ -383,10 +383,13 @@ int sync_file_range(int fd, loff_t offse
>  * @offset:            file offset.
>  * @len:               file size.
>  */
> +
> +#ifndef __NR_fallocate
>  int fallocate(int fd, int mode, loff_t offset, loff_t len)
>  {
>        return syscall(__NR_fallocate, fd, mode, offset, len);
>  }
> +#endif

    If it's not defined, you're definitely in trouble because that
will result in a compile error. An autoconf test should be added for
this syscall, and/or linux_syscall_numbers.h should be integrated into
this test. That may be a bit heavy handed because that will integrate
some libltp pieces into the tests, but that's up to Miao to decide.
Thanks,
-Garrett

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] Fix fallocate() build issue for EXT4 Online Defragmentation Test
  2010-03-24 17:48 ` Garrett Cooper
@ 2010-03-25 18:56   ` Subrata Modak
  2010-03-25 21:13     ` Garrett Cooper
  2010-03-26  5:35     ` Miao Xie
  0 siblings, 2 replies; 5+ messages in thread
From: Subrata Modak @ 2010-03-25 18:56 UTC (permalink / raw)
  To: Miao Xie; +Cc: LTP Mailing List

Miao,

On Wed, 2010-03-24 at 10:48 -0700, Garrett Cooper wrote:
> On Wed, Mar 24, 2010 at 6:36 AM, Subrata Modak
> <subrata@linux.vnet.ibm.com> wrote:
> > Earlier Subject: Re: [LTP] ext4/e4defrag.c testcases compilation error,
> >
> > Hi Garret/Miao,
> >
> > On PPC systems, fallocate() seems to be already defined at /usr/include/bits/fcntl.h,
> > so building EXT4 test cases on PPC64 machines will create build problems even if the
> > pre-requisite packages:
> >
> > e2fsprogs*
> > e2fsprogs-libs*
> > e2fsprogs-devel*
> >
> > are present. So, this patch adds an extra check. Please let me know your thoughts.
> >
> > Errors bound to occur:
> > [
> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall  -I/root/subrata/ltp/ltp-dev/testcases/kernel/include -I../../../../../include -I../../../../../include   -L../../../../../lib  e4defrag.c   -lltp -lm -o e4defrag
> > e4defrag.c:388: error: conflicting types for ‘fallocate’
> > /usr/include/bits/fcntl.h:240: note: previous declaration of ‘fallocate’ was here
> > make[1]: *** [e4defrag] Error 1
> > ]
> >
> > Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
> > ---
> >
> > --- ltp-dev/testcases/kernel/fs/ext4-new-features/ext4-online-defrag/e4defrag.c 2010-03-15 19:32:12.000000000 +0530
> > +++ ltp-dev.modified/testcases/kernel/fs/ext4-new-features/ext4-online-defrag/e4defrag.c        2010-03-24 18:09:14.336793513 +0530
> > @@ -383,10 +383,13 @@ int sync_file_range(int fd, loff_t offse
> >  * @offset:            file offset.
> >  * @len:               file size.
> >  */
> > +
> > +#ifndef __NR_fallocate
> >  int fallocate(int fd, int mode, loff_t offset, loff_t len)
> >  {
> >        return syscall(__NR_fallocate, fd, mode, offset, len);
> >  }
> > +#endif
> 
>     If it's not defined, you're definitely in trouble because that
> will result in a compile error. An autoconf test should be added for
> this syscall, and/or linux_syscall_numbers.h should be integrated into
> this test. That may be a bit heavy handed because that will integrate
> some libltp pieces into the tests, but that's up to Miao to decide.

Did you get a chance to check this patch ?

Regards--
Subrata

> Thanks,
> -Garrett


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] Fix fallocate() build issue for EXT4 Online Defragmentation Test
  2010-03-25 18:56   ` Subrata Modak
@ 2010-03-25 21:13     ` Garrett Cooper
  2010-03-26  5:35     ` Miao Xie
  1 sibling, 0 replies; 5+ messages in thread
From: Garrett Cooper @ 2010-03-25 21:13 UTC (permalink / raw)
  To: subrata; +Cc: LTP Mailing List, Miao Xie

On Thu, Mar 25, 2010 at 11:56 AM, Subrata Modak
<subrata@linux.vnet.ibm.com> wrote:
> Miao,
>
> On Wed, 2010-03-24 at 10:48 -0700, Garrett Cooper wrote:
>> On Wed, Mar 24, 2010 at 6:36 AM, Subrata Modak
>> <subrata@linux.vnet.ibm.com> wrote:
>> > Earlier Subject: Re: [LTP] ext4/e4defrag.c testcases compilation error,
>> >
>> > Hi Garret/Miao,
>> >
>> > On PPC systems, fallocate() seems to be already defined at /usr/include/bits/fcntl.h,
>> > so building EXT4 test cases on PPC64 machines will create build problems even if the
>> > pre-requisite packages:
>> >
>> > e2fsprogs*
>> > e2fsprogs-libs*
>> > e2fsprogs-devel*
>> >
>> > are present. So, this patch adds an extra check. Please let me know your thoughts.
>> >
>> > Errors bound to occur:
>> > [
>> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall  -I/root/subrata/ltp/ltp-dev/testcases/kernel/include -I../../../../../include -I../../../../../include   -L../../../../../lib  e4defrag.c   -lltp -lm -o e4defrag
>> > e4defrag.c:388: error: conflicting types for ‘fallocate’
>> > /usr/include/bits/fcntl.h:240: note: previous declaration of ‘fallocate’ was here
>> > make[1]: *** [e4defrag] Error 1
>> > ]
>> >
>> > Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
>> > ---
>> >
>> > --- ltp-dev/testcases/kernel/fs/ext4-new-features/ext4-online-defrag/e4defrag.c 2010-03-15 19:32:12.000000000 +0530
>> > +++ ltp-dev.modified/testcases/kernel/fs/ext4-new-features/ext4-online-defrag/e4defrag.c        2010-03-24 18:09:14.336793513 +0530
>> > @@ -383,10 +383,13 @@ int sync_file_range(int fd, loff_t offse
>> >  * @offset:            file offset.
>> >  * @len:               file size.
>> >  */
>> > +
>> > +#ifndef __NR_fallocate
>> >  int fallocate(int fd, int mode, loff_t offset, loff_t len)
>> >  {
>> >        return syscall(__NR_fallocate, fd, mode, offset, len);
>> >  }
>> > +#endif
>>
>>     If it's not defined, you're definitely in trouble because that
>> will result in a compile error. An autoconf test should be added for
>> this syscall, and/or linux_syscall_numbers.h should be integrated into
>> this test. That may be a bit heavy handed because that will integrate
>> some libltp pieces into the tests, but that's up to Miao to decide.
>
> Did you get a chance to check this patch ?
>
> Regards--
> Subrata

    Nope, but my concern still stands unaddressed.
Thanks,
-Garrett

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] Fix fallocate() build issue for EXT4 Online Defragmentation Test
  2010-03-25 18:56   ` Subrata Modak
  2010-03-25 21:13     ` Garrett Cooper
@ 2010-03-26  5:35     ` Miao Xie
  1 sibling, 0 replies; 5+ messages in thread
From: Miao Xie @ 2010-03-26  5:35 UTC (permalink / raw)
  To: subrata; +Cc: LTP Mailing List

Hi, Subrata.

Sorry! Reply is late.

on 2010-3-26 2:56, Subrata Modak wrote:
>>> Earlier Subject: Re: [LTP] ext4/e4defrag.c testcases compilation error,
>>>
>>> Hi Garret/Miao,
>>>
>>> On PPC systems, fallocate() seems to be already defined at /usr/include/bits/fcntl.h,
>>> so building EXT4 test cases on PPC64 machines will create build problems even if the
>>> pre-requisite packages:
>>>
>>> e2fsprogs*
>>> e2fsprogs-libs*
>>> e2fsprogs-devel*
>>>
>>> are present. So, this patch adds an extra check. Please let me know your thoughts.
>>>
>>> Errors bound to occur:
>>> [
>>> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall  -I/root/subrata/ltp/ltp-dev/testcases/kernel/include -I../../../../../include -I../../../../../include   -L../../../../../lib  e4defrag.c   -lltp -lm -o e4defrag
>>> e4defrag.c:388: error: conflicting types for ‘fallocate’
>>> /usr/include/bits/fcntl.h:240: note: previous declaration of ‘fallocate’ was here
>>> make[1]: *** [e4defrag] Error 1
>>> ]
>>>
>>> Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
>>> ---
>>>
>>> --- ltp-dev/testcases/kernel/fs/ext4-new-features/ext4-online-defrag/e4defrag.c 2010-03-15 19:32:12.000000000 +0530
>>> +++ ltp-dev.modified/testcases/kernel/fs/ext4-new-features/ext4-online-defrag/e4defrag.c        2010-03-24 18:09:14.336793513 +0530
>>> @@ -383,10 +383,13 @@ int sync_file_range(int fd, loff_t offse
>>>  * @offset:            file offset.
>>>  * @len:               file size.
>>>  */
>>> +
>>> +#ifndef __NR_fallocate
>>>  int fallocate(int fd, int mode, loff_t offset, loff_t len)
>>>  {
>>>        return syscall(__NR_fallocate, fd, mode, offset, len);
>>>  }
>>> +#endif
>>
>>     If it's not defined, you're definitely in trouble because that
>> will result in a compile error. An autoconf test should be added for
>> this syscall, and/or linux_syscall_numbers.h should be integrated into
>> this test. That may be a bit heavy handed because that will integrate
>> some libltp pieces into the tests, but that's up to Miao to decide.
> 
> Did you get a chance to check this patch ?

I found that the latest e4defrag was released and had been merged into the latest
version(1.4.11) of e2fsprogs. So I think we should update e4defrag.c in LTP to the
latest version. I think if e4defrag is installed into the system, we needn't use
e4defrag in the LTP. If not, we use e4defrag in the LTP.

And before compiling ext4-new-features testcases, we do an autoconf test and check
whether fallocate() has been defined or not, just like header files check.

Regards
Miao

> 
> Regards--
> Subrata
> 
>> Thanks,
>> -Garrett
> 
> 
> 
> 



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-26  5:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-24 13:36 [LTP] [PATCH] Fix fallocate() build issue for EXT4 Online Defragmentation Test Subrata Modak
2010-03-24 17:48 ` Garrett Cooper
2010-03-25 18:56   ` Subrata Modak
2010-03-25 21:13     ` Garrett Cooper
2010-03-26  5:35     ` Miao Xie

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.