On 13 March 2013 19:16, Markos Chandras <[email protected]> wrote:
> On 13 March 2013 18:23,  <[email protected]> wrote:
>> Hi!
>>> The problem is that for arches that don't have SYS_getdents defined,
>>> you will not be able to compile LTP on them so you really need to
>>> hide this codepath from them.
>>>
>>> A similar commit that changes the codepath based on whether a
>>> particular __NR_XX is defined is this
>>> https://github.com/linux-test-project/ltp/commit/75201f160b9aa49af70d8f46fb1f087e63d603dd
>>>
>>> I don't see an easy way to determine if __NR_XX is defined or not
>>> during runtime.
>>
>> There is code that tries to address this issue in
>> testcases/kernel/include/linux_syscall_numbers.h
>> which defines macro ltp_syscall() that turns undefined
>> syscall numbers into ENOSYS.
>>
>> The idea is to:
>>
>> 1) include sys/syscall.h to get the definitions system definitons
>>
>> 2) if your system headers are older (i.e. particular __NR_xxx is not defined)
>>    definitions from arch.in files are used
>>
>> 3) if __NR_xxx is not defined, there are stubs at the end of the header
>>    that defines the __NR_xxx to 0 which is then used by the ltp_syscall()
>>    macro to return -1 and set errno to ENOSYS
>>
>> --
>> Cyril Hrubis
>> [email protected]
>
> Hi Cyril,
>
> Ok thanks. So if this is how you want to solve this situation, I guess
> it is possible to do what Jan proposed earlier. Use a new parameter
> (say "-l" for "long", or pick another one), then define a new
> getdents64 in getdents.h similar to the existing getdents one. The
> only difference would be that we will use the "struct dirent64" and
> "struct linux_dirent64". Finally use ltp_syscall() to call the
> SYS_getdents{,64} syscalls instead of syscall().
>
> If you agree with that I will create a new patch.
>
> --
> Regards,
> Markos Chandras

Hi,

I wrote patch that does what we talked about.

https://github.com/hwoarang/ltp/commit/3e361757a9cfd6c6af50a395c2de68777356a4b6

If you are happy with the way it is implemented, I will post it to the
mailing list for further review.

-- 
Regards,
Markos Chandras

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to