Hi,

This patch adds the library routines in cpu controller test case 3.
<addlibrary-test2.patch>

Signed-off-by: Sudhir Kumar <[EMAIL PROTECTED]>

Index: ltp-full-20080131/testcases/kernel/controllers/cpuctl/cpuctl_test01.c
===================================================================
--- ltp-full-20080131.orig/testcases/kernel/controllers/cpuctl/cpuctl_test01.c
+++ ltp-full-20080131/testcases/kernel/controllers/cpuctl/cpuctl_test01.c
@@ -215,6 +215,18 @@ exp_cpu_time, myshares, delta_time);
                                                 myshares -= baseshares * 
GRANULARITY / 100;
                                 }
                                write_to_file (mysharesfile, "w", myshares);
+                               if (test_num == 2)
+                               {
+                               /*
+                                * Read the shares file and again calculate the 
cpu fraction
+                                * No need to read tasks file as we do not 
migrate tasks
+                                * No need to scan all shares file as total 
shares are const
+                                */
+                               if ((fmyshares = 
read_shares_file(mysharesfile)) < 2)
+                                       tst_brkm (TBROK, cleanup, "in reading 
shares files  %s ", mysharesfile);
+                               exp_cpu_time = (double)(fmyshares * 100) 
/(total_shares * num_tasks);
+                               }
+
                                fprintf(stdout,"\ntask-%d 
SHARES=%lu\n",my_group_num, myshares);
                        }/* end if*/
         }/* end while*/


Thanks,
Sudhir Kumar
LTC, ISTL


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to