This cleans up existing swap files in swapon03 test in failing test case.  
Otherwise, deleted swap files would still exist in /proc/swaps.

Signed-off-by: Murlin Ray Wenzel [email protected]


Murlin Ray Wenzel
Sr. Engineer
[email protected]
Office: 801 861 5748
Cell: 801 380 4520

Novell
Making IT Work As One.
www.novell.com






--- ltp-intermediate-20100228-orig/testcases/kernel/syscalls/swapon/swapon03.c  
2010-02-24 09:00:53.000000000 -0700
+++ ltp-intermediate-20100228/testcases/kernel/syscalls/swapon/swapon03.c       
2010-02-24 09:02:56.000000000 -0700
@@ -291,6 +291,8 @@
 
                        /* turn on the swap file */
                        if ((res = syscall(__NR_swapon, filename, 0)) != 0) {
+                               /* Must clean up existing swap files since 
tst_brkm doesn't return*/
+                               clean_swap();
                                tst_brkm(TFAIL | TERRNO, cleanup,
                                         "Failed swapon for file %s", filename);
                                /* must cleanup already swapon files */

<<attachment: Murlin_Wenzel.vcf>>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to