On 15.11.2006 [12:41:44 +1100], David Gibson wrote:
> On Tue, Nov 14, 2006 at 01:49:48PM -0800, Nishanth Aravamudan wrote:
> > On 14.11.2006 [15:28:37 -0600], Adam Litke wrote:
> > > On Tue, 2006-11-14 at 09:55 -0800, Nishanth Aravamudan wrote:
> > > > On 14.11.2006 [12:29:01 +1100], David Gibson wrote:

<snip>

> Good as far as it goes.  However, we should probably *also* do some
> tests where we don't clear the cache between runs.  After all the
> elflink code is supposed to work if the cache already exists, too.

Try #3, incorporating both your and Adam's comments:

After the daemon removal, there was a change in the side-effects of
running `make check` relative to the linkshare testcases, as hugepages
would be left consumed on the system, that were not before the test ran.
`rm -rf` the files we create (we assume the testsuite is the only
hugepage consumer on the system in general, when run), to free them back
up after running. Run the elfshare test twice now, once with this
cleaning up of hugepages and once without.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>

diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index d0be9d1..572635a 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -21,6 +21,10 @@ function hugetlbfs_path() {
     fi
 }
 
+function clear_hpages() {
+    rm -rf `hugetlbfs_path`/elflink-uid-`id -u`
+}
+
 TOTAL_HPAGES=$(grep 'HugePages_Total:' /proc/meminfo | cut -f2 -d:)
 [ -z "$TOTAL_HPAGES" ] && TOTAL_HPAGES=0
 HPAGE_SIZE=$(grep 'Hugepagesize:' /proc/meminfo | awk '{print $2}')
@@ -73,12 +77,23 @@ elfshare_test () {
     unset args[$N]
     set -- "[EMAIL PROTECTED]"
     # Run each elfshare test invocation independently - clean up the
-    # sharefiles before and after:
+    # sharefiles before and after in the first set of runs, but leave
+    # them there in the second:
     NUM_THREADS=2
+    clear_hpages
+    run_test HUGETLB_SHARE=2 "$@" "xB.$baseprog" $NUM_THREADS
+    clear_hpages
+    run_test HUGETLB_SHARE=1 "$@" "xB.$baseprog" $NUM_THREADS
+    clear_hpages
+    run_test HUGETLB_SHARE=2 "$@" "xBDT.$baseprog" $NUM_THREADS
+    clear_hpages
+    run_test HUGETLB_SHARE=1 "$@" "xBDT.$baseprog" $NUM_THREADS
+    clear_hpages
     run_test HUGETLB_SHARE=2 "$@" "xB.$baseprog" $NUM_THREADS
     run_test HUGETLB_SHARE=1 "$@" "xB.$baseprog" $NUM_THREADS
     run_test HUGETLB_SHARE=2 "$@" "xBDT.$baseprog" $NUM_THREADS
     run_test HUGETLB_SHARE=1 "$@" "xBDT.$baseprog" $NUM_THREADS
+    clear_hpages
 }
 
 setup_shm_sysctl() {

-- 
Nishanth Aravamudan <[EMAIL PROTECTED]>
IBM Linux Technology Center

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to