fix maximum seconds of -I option
A message that is not in the archive (sent off-list or not yet received): 1438985307.326821290583410077.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com
PATCH 1/1 fix maximum seconds of -I option
Quoted 10 lines
From: [email protected]
To: "ltp-list" <[email protected]>
Sent: Monday, November 15, 2010 9:30:40 PM GMT +08:00 Beijing / Chongqing / Hong Kong / Urumqi
Subject: [LTP] maximum seconds of -IHi, I am wondering if there is a limitation of seconds you can specify in standard command-line options for,
-I x Execute test for x seconds
Quoted 9 lines
I noticed that when given a value like 3600, the test returned immediately like,
./hugemmap04 -I 3600 -H
/var/hugetlbfsIs this expected?
CAI Qian
Hi,all
I fixed the -I options, and now it support a very large number such as 360000000000 or larger than.
Signature · 1 line
Name: Zhouping Liu
From 73272825b8597e1f1bbba7428d1f3f7ffd2e69b4 Mon Sep 17 00:00:00 2001
From: Zhouping Liu <[email protected]>
Date: Wed, 24 Nov 2010 14:50:01 +0800
Subject: [PATCH] Enable the '-I' options, such as
./testcases/kernel/mem/hugetlb/hugemmap/hugemmap04 -I 360000 -H /var/hugetlbfs/ Add a line in order to avoid the 'SEGBUS' error.
--- lib/parse_opts.c | 6 +++--- testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-)
lib/parse_opts.c +3 -3
@@ -699,7 +699,7 @@ usc_test_looping(counter)int counter; {static int first_time =1 ; -static int stop_time =0 ;/* stop time in rtc or usecs */ +static double stop_time =0 ;/* stop time in rtc or usecs */ static int delay;/* delay in clocks or usecs */ int hertz=0 ;/* clocks per second or usecs per second */ int ct, end;/* current time, end delay time */
@@ -724,7 +724,7 @@ int counter;if (STD_LOOP_DURATION ) { ct=get_current_time (); - stop_time=(int )((float )hertz *STD_LOOP_DURATION ) + ct; + stop_time = (double )hertz * (double )STD_LOOP_DURATION + (double )ct; }/*
@@ -769,7 +769,7 @@ int counter; keepgoing++; } -if (STD_LOOP_DURATION !=0.0 &&get_current_time () < stop_time ) { +if (STD_LOOP_DURATION !=0.0 && (double )get_current_time () < stop_time ) { keepgoing++; }
testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c +2 -1
@@ -143,7 +143,8 @@ main(int ac, char **av) }/* Reset Tst_count in case we are looping. */ Tst_count=0 ; - +/* force to allocate page and change HugePages_Free */ +write (fildes,"Write some words to the TEMPFILE\n" ,40 );/* Note the number of free huge pages BEFORE testing */ freepages =getfreehugepages (); beforetest = freepages;
Signature · 1 line
1.7.2.3
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list