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:
> > diff --git a/tests/run_tests.sh b/tests/run_tests.sh
> > index d0be9d1..adda47c 100755
> > --- a/tests/run_tests.sh
> > +++ b/tests/run_tests.sh
> > @@ -75,10 +75,15 @@ elfshare_test () {
> >      # Run each elfshare test invocation independently - clean up the
> >      # sharefiles before and after:
> >      NUM_THREADS=2
> > +    rm -rf `hugetlbfs_path`/elflink-uid-`id -u`
> >      run_test HUGETLB_SHARE=2 "$@" "xB.$baseprog" $NUM_THREADS
> > +    rm -rf `hugetlbfs_path`/elflink-uid-`id -u`
> >      run_test HUGETLB_SHARE=1 "$@" "xB.$baseprog" $NUM_THREADS
> > +    rm -rf `hugetlbfs_path`/elflink-uid-`id -u`
> >      run_test HUGETLB_SHARE=2 "$@" "xBDT.$baseprog" $NUM_THREADS
> > +    rm -rf `hugetlbfs_path`/elflink-uid-`id -u`
> >      run_test HUGETLB_SHARE=1 "$@" "xBDT.$baseprog" $NUM_THREADS
> > +    rm -rf `hugetlbfs_path`/elflink-uid-`id -u`
> 
> How about a function to do that rather than repeating that string 5
> times?

Done.

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.

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

diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index a511aa1..041afe6 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}')
@@ -75,10 +79,15 @@ elfshare_test () {
     # Run each elfshare test invocation independently - clean up the
     # sharefiles before and after:
     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`
 }
 
 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