From: Subrata <sub...@us...> - 2008-08-22 21:23:44
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/sync_file_range In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19414/ltp/testcases/kernel/syscalls/sync_file_range Modified Files: sync_file_range01.c Log Message: Build Error fix. I too had prepared the same patch, but there were some more issues on a different kernel. Hence, have put more checks in the newly attached patch. Subrata, I have tested it on ppc64 and x86_64 and is working fine. Please test and let me know. Signed-Off-By: "B. N. Poornima" <poo...@in...>, Signed-Off-By: Jin Bing Guo <gu...@cn...>. Index: sync_file_range01.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/sync_file_range/sync_file_range01.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sync_file_range01.c 18 Aug 2008 10:37:42 -0000 1.1 --- sync_file_range01.c 22 Aug 2008 21:23:40 -0000 1.2 *************** *** 246,255 **** { ! #if defined(__powerpc64__) && (__WORDSIZE==32) return syscall(__NR_sync_file_range2, fd, flags, (int)(offset >>32), \ (int)offset, (int)(nbytes >>32), (int)nbytes); ! #elif defined(__powerpc64__) && (__WORDSIZE==64) return syscall(__NR_sync_file_range2, fd, flags, offset, nbytes); --- 246,255 ---- { ! #if (defined(__powerpc64__) || defined(__powerpc__)) && (__WORDSIZE==32) return syscall(__NR_sync_file_range2, fd, flags, (int)(offset >>32), \ (int)offset, (int)(nbytes >>32), (int)nbytes); ! #elif (defined(__powerpc64__) || defined(__powerpc__)) && (__WORDSIZE==64) return syscall(__NR_sync_file_range2, fd, flags, offset, nbytes); *************** *** 295,310 **** /*************************************************************** ! parse standard options ********************************************************************/ if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg); ! /* This test needs kernel version > 2.6.16 */ ! if ( !arch_support || (tst_kvercmp(2,6,17) < 0)) { tst_resm(TCONF, "System doesn't support execution of the test"); tst_exit(); } ! /* perform global test setup, call setup() function. */ --- 295,318 ---- /*************************************************************** ! parse standard options ********************************************************************/ if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg); ! ! #if defined(__powerpc__) || defined(__powerpc64__) /* for PPC, kernel version > 2.6.21 needed */ ! if ( !arch_support || (tst_kvercmp(2,16,22) < 0)) { ! tst_resm(TCONF, "System doesn't support execution of the test"); ! tst_exit(); ! } ! #else ! /* For other archs, need kernel version > 2.6.16 */ ! if ( !arch_support || (tst_kvercmp(2,6,17) < 0)) { tst_resm(TCONF, "System doesn't support execution of the test"); tst_exit(); } ! ! #endif /* perform global test setup, call setup() function. */ |