hi,

*[Patch 1/1] Patch for fixing the failed testcase openposix_mmap_11_4

-modified the file
*testcases/open_posix_testsuite/conformance/interfaces/mmap/11-4.c


Signed-off-by:  fredrick he <[email protected]>

---
ltp.orig/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-4.c      
2009-07-17 11:53:36.000000000 +0800
+++
ltp/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-4.c
2009-07-17 11:57:09.000000000 +0800
@@ -130,7 +130,9 @@ int main()
   flag = MAP_SHARED; 
   off = 0; 
   pa = mmap(addr, len, prot, flag, fd_2, off);
-  pa_2 = mmap(addr, len, prot, flag, fd_2, off);
+  addr = pa;
+  memset(addr,0,len*2);
+  pa_2 = mmap(addr, len, prot, flag|MAP_FIXED, fd_2, off);
   if (pa_2 == MAP_FAILED)
   {
     printf("Test FAIL: " TNAME " Error at 2nd mmap(): %s\n",

-- 

Fan Fredrick He
R&D OPS QA Beijing PRC
Room 3603, Beijing Fortune Plaza, Office Tower A, No.7 Dongsanhuan Zhonglu, 
Chaoyang District, Beijing, P.R., 100020
SUSE LINUX Products
[email protected]
Mainland-Mobile (86) 13661278596
--- ltp.orig/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-4.c	2009-07-17 11:53:36.000000000 +0800
+++ ltp/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-4.c	2009-07-17 11:57:09.000000000 +0800
@@ -130,7 +130,9 @@ int main()
   flag = MAP_SHARED; 
   off = 0; 
   pa = mmap(addr, len, prot, flag, fd_2, off);
-  pa_2 = mmap(addr, len, prot, flag, fd_2, off);
+  addr = pa;
+  memset(addr,0,len*2);
+  pa_2 = mmap(addr, len, prot, flag|MAP_FIXED, fd_2, off);
   if (pa_2 == MAP_FAILED)
   {
     printf("Test FAIL: " TNAME " Error at 2nd mmap(): %s\n",
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to