[PATCH] oprofile-tests increase iterations for anon_remap test

Will Schmidt <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
Hi,

 We've noticed the anon_remap.c testcase failing on some of our systems.
From a verbose test run log, we note that the anon_remap_bin workload is
getting just a small number of the overall samples.
Results vary greatly depending on the system size and speed.
    
> samples  %        app name                 symbol name
> 5031     99.7620  /no-vmlinux              /no-vmlinux
> 5         0.0991  /usr/bin/bash            /usr/bin/bash
> 1         0.0198  /home/willschm/oprofile-tests/testsuite/workloads/anon_remap_src/anon_remap_bin 00000017.plt_call.memcpy@@GLIBC_2.17
> 1         0.0198  /home/willschm/oprofile-tests/testsuite/workloads/anon_remap_src/anon_remap_bin initialize_anon_func
    
The (anon_remap.c) testcase itself will take an argument to override the
default number of iterations, but as far as I can tell the test harness
does not handle passing arguments to the test itself.
I've instead increased the default iteration to a much higher
value, this seems sufficient to allow the test to pass.

Signed-off-by: Will Schmidt <[email protected]>

--

 anon_remap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/testsuite/workloads/anon_remap_src/anon_remap.c b/testsuite/workloads/anon_remap_src/anon_remap.c
index 293476d..bbff472 100644
--- a/testsuite/workloads/anon_remap_src/anon_remap.c
+++ b/testsuite/workloads/anon_remap_src/anon_remap.c
@@ -102,11 +102,11 @@ main(int argc, char *argv[])
   int iter_max;
 
   if (argc == 2)
     iter_max = atoi(argv[1]);
   else
-    iter_max = 2000;
+    iter_max = 40000;
 
   page_size = (size_t)sysconf(_SC_PAGESIZE);
   initial_buffer_size = (MINIMUM_BUFFER_SIZE / page_size + 1) * page_size;
   /* remapped_buffer_size must be larger than initial_buffer_size */
   remapped_buffer_size = initial_buffer_size * 2;



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.