From: Subrata <sub...@us...> - 2009-03-18 08:51:56
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/writev In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv464/ltp/testcases/kernel/syscalls/writev Modified Files: writev06.c Log Message: Writev06: Fix Error Checking for mmap() v2: Sometimes, writev06 test case failed due to receiving a SIGSEGV signal. This is due to out of range access of array. In addition, The test gives too little information to figure it out what might be wrong. The following patch makes it easier to debug this type of failure by fixing error checking code for mmap() calls. Signed-off-by: CAI Qian <ca...@cc...>. Index: writev06.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/writev/writev06.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** writev06.c 18 Mar 2009 08:31:06 -0000 1.6 --- writev06.c 18 Mar 2009 08:51:47 -0000 1.7 *************** *** 212,220 **** tst_brkm(TBROK, cleanup, "mmap failed for good_addr[1]"); - bad_addr[2] = mmap(NULL, page_size * 3, PROT_NONE, - MAP_PRIVATE_EXCEPT_UCLINUX|MAP_ANONYMOUS, 0, 0); - if (bad_addr[2] == MAP_FAILED) - tst_brkm(TBROK, cleanup, "mmap failed for bad_addr[2]"); - /* force page fault for writable mappings*/ memset(good_addr[0],'a', page_size); --- 212,215 ---- |