All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] check_sync_file_range()
@ 2019-03-20 20:04 Rafael David Tinoco
  2019-03-22  4:42 ` Sumit Garg
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael David Tinoco @ 2019-03-20 20:04 UTC (permalink / raw)
  To: ltp

I believe check_sync_file_range() logic, from commit c0dc8876fb1486ee85f6dd43e36ec5b3d9d9a4ed, should use a different names since glibc seems to be implementing the syscall wrapper in recent versions and a conflict exists for me at least:

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_FORTIFY_SOURCE=2 -I../../../../include -I../../../../include -I../../../../include/old/   -L../../../../lib  sync_file_range02.c   -lltp -o sync_file_range02
In file included from sync_file_range02.c:21:
../../../../include/lapi/sync_file_range.h:24:20: error: conflicting types for ‘sync_file_range’
 static inline long sync_file_range(int fd, off64_t offset, off64_t nbytes,
                    ^~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61,
                 from /usr/include/fcntl.h:35,
                 from ../../../../include/tst_safe_macros.h:27,
                 from ../../../../include/tst_test.h:90,
                 from sync_file_range02.c:20:
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:397:12: note: previous declaration of ‘sync_file_range’ was here
 extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
            ^~~~~~~~~~~~~~~



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

* [LTP] check_sync_file_range()
  2019-03-20 20:04 [LTP] check_sync_file_range() Rafael David Tinoco
@ 2019-03-22  4:42 ` Sumit Garg
  2019-03-22  9:25   ` Rafael Tinoco
  0 siblings, 1 reply; 3+ messages in thread
From: Sumit Garg @ 2019-03-22  4:42 UTC (permalink / raw)
  To: ltp

Hi Rafael,

On Thu, 21 Mar 2019 at 01:34, Rafael David Tinoco
<rafael.tinoco@linaro.org> wrote:
>
> I believe check_sync_file_range() logic, from commit c0dc8876fb1486ee85f6dd43e36ec5b3d9d9a4ed, should use a different names since glibc seems to be implementing the syscall wrapper in recent versions and a conflict exists for me at least:
>
> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_FORTIFY_SOURCE=2 -I../../../../include -I../../../../include -I../../../../include/old/   -L../../../../lib  sync_file_range02.c   -lltp -o sync_file_range02
> In file included from sync_file_range02.c:21:
> ../../../../include/lapi/sync_file_range.h:24:20: error: conflicting types for ‘sync_file_range’
>  static inline long sync_file_range(int fd, off64_t offset, off64_t nbytes,
>                     ^~~~~~~~~~~~~~~
> In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61,
>                  from /usr/include/fcntl.h:35,
>                  from ../../../../include/tst_safe_macros.h:27,
>                  from ../../../../include/tst_test.h:90,
>                  from sync_file_range02.c:20:
> /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:397:12: note: previous declaration of ‘sync_file_range’ was here
>  extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
>             ^~~~~~~~~~~~~~~
>

Did you ran configure check before building the test-case? Actually
the commit you referred to adds functionality to use glibc syscall
wrapper if present or else fallback to api defined in
include/lapi/sync_file_range.h.

See: "m4/ltp-sync_file_range.m4", "configure.ac" for configure check.

-Sumit

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

* [LTP] check_sync_file_range()
  2019-03-22  4:42 ` Sumit Garg
@ 2019-03-22  9:25   ` Rafael Tinoco
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael Tinoco @ 2019-03-22  9:25 UTC (permalink / raw)
  To: ltp

On Fri, Mar 22, 2019, 1:42 AM Sumit Garg <sumit.garg@linaro.org> wrote:

> Hi Rafael,
>
> On Thu, 21 Mar 2019 at 01:34, Rafael David Tinoco
> <rafael.tinoco@linaro.org> wrote:
> >
> > I believe check_sync_file_range() logic, from commit
> c0dc8876fb1486ee85f6dd43e36ec5b3d9d9a4ed, should use a different names
> since glibc seems to be implementing the syscall wrapper in recent versions
> and a conflict exists for me at least:
> >
> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W
> -Wold-style-definition -D_FORTIFY_SOURCE=2 -I../../../../include
> -I../../../../include -I../../../../include/old/   -L../../../../lib
> sync_file_range02.c   -lltp -o sync_file_range02
> > In file included from sync_file_range02.c:21:
> > ../../../../include/lapi/sync_file_range.h:24:20: error: conflicting
> types for ‘sync_file_range’
> >  static inline long sync_file_range(int fd, off64_t offset, off64_t
> nbytes,
> >                     ^~~~~~~~~~~~~~~
> > In file included from /usr/include/x86_64-linux-gnu/bits/fcntl.h:61,
> >                  from /usr/include/fcntl.h:35,
> >                  from ../../../../include/tst_safe_macros.h:27,
> >                  from ../../../../include/tst_test.h:90,
> >                  from sync_file_range02.c:20:
> > /usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:397:12: note: previous
> declaration of ‘sync_file_range’ was here
> >  extern int sync_file_range (int __fd, __off64_t __offset, __off64_t
> __count,
> >             ^~~~~~~~~~~~~~~
> >
>
> Did you ran configure check before building the test-case? Actually
> the commit you referred to adds functionality to use glibc syscall
> wrapper if present or else fallback to api defined in
> include/lapi/sync_file_range.h.
>
> See: "m4/ltp-sync_file_range.m4", "configure.ac" for configure check.
>

True, my bad. Thanks Submit. Sorry for the false warning.

>
> -Sumit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20190322/e4cf15ff/attachment.html>

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

end of thread, other threads:[~2019-03-22  9:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-20 20:04 [LTP] check_sync_file_range() Rafael David Tinoco
2019-03-22  4:42 ` Sumit Garg
2019-03-22  9:25   ` Rafael Tinoco

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.