=========================================================
Manas K. Nayak <maknayak@in.ibm.com> reported:
=========================================================
accept4_01 test cases are broken because the function accept04() is not implemented in testcase. Used ltp version: ltp-full-20081130.tgz. Manually executed the test as below:
[accept4]# ./accept4_01
accept04_01    1  BROK  :  accept4() Error: Function not implemented
=========================================================
Subrata Modak <subrata@linux.vnet.ibm.com> replied:
=========================================================
Fix on x86_64 as well, as it behaves properly on other Architectures.
Supriya/Manas, accept4_01.c is a new test case for the new system call accept4() recently introduced in kernel-2.6.26 only for the x86_64 architecture. The test has the code to handle if it is not supported in some architecture. Interestingly it executes the expected way on x86 machines:
# uname -a
Linux 2.6.25-gcov-nomodconfig-smp #1 SMP Thu Jun 12 06:29:27 EDT 2008 i686 i686 i386 GNU/Linux
# ./ltp-intermediate-20081216/testcases/bin/accept4_01
accept04_01    1  CONF  :  syscall __NR_accept4 not supported on your arch
But on x86_64, it behaves differently:
# uname -a
Linux 2.6.18-125.el5 #1 SMP Mon Dec 1 17:38:25 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
# ./accept4_01
accept04_01    1  BROK  :  accept4() Error: Function not implemented
It means though the interface calls for:
syscall(__NR_socketcall, SYS_ACCEPT4, args)
&
syscall(__NR_accept4, fd, sockaddr, addrlen, flags)
will execute as __NR_socketcall & __NR_accept4 are defined inside the system, the exact implementation of the interface is yet to come as the kernel < 2.6.26. So, i changed the code accordingly. Please verify the patch. Signed-Off-By: Subrata Modak <subrata@linux.vnet.ibm.com>.
1 file changed