Author: njn
Date: 2007-09-23 01:55:20 +0100 (Sun, 23 Sep 2007)
New Revision: 6903

Log:
Add a test that does no allocations.

Added:
   branches/MASSIF2/massif/tests/null.c
   branches/MASSIF2/massif/tests/null.post.exp
   branches/MASSIF2/massif/tests/null.stderr.exp
   branches/MASSIF2/massif/tests/null.vgtest
Modified:
   branches/MASSIF2/massif/ms_main.c
   branches/MASSIF2/massif/tests/Makefile.am


Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c   2007-09-23 00:51:24 UTC (rev 6902)
+++ branches/MASSIF2/massif/ms_main.c   2007-09-23 00:55:20 UTC (rev 6903)
@@ -31,7 +31,6 @@
 // XXX:
 //---------------------------------------------------------------------------
 // Todo:
-// - add a test that does no allocations (nb must use --stacks=no)
 // - do a test for realloc -- I think no snapshots are being taken for it.
 // - do tests with complicated stack traces -- big ones, ones that require
 //   XCon_redo, ones that exceed --depth, etc.

Modified: branches/MASSIF2/massif/tests/Makefile.am
===================================================================
--- branches/MASSIF2/massif/tests/Makefile.am   2007-09-23 00:51:24 UTC (rev 
6902)
+++ branches/MASSIF2/massif/tests/Makefile.am   2007-09-23 00:55:20 UTC (rev 
6903)
@@ -12,6 +12,7 @@
         culling1.stderr.exp culling1.vgtest \
         culling2.stderr.exp culling2.vgtest \
        long-time.post.exp long-time.stderr.exp long-time.vgtest \
+       null.post.exp null.stderr.exp null.vgtest \
        thresholds_0_0.post.exp   thresholds_0_0.stderr.exp   
thresholds_0_0.vgtest \
        thresholds_0_10.post.exp  thresholds_0_10.stderr.exp  
thresholds_0_10.vgtest \
        thresholds_10_0.post.exp  thresholds_10_0.stderr.exp  
thresholds_10_0.vgtest \
@@ -30,6 +31,7 @@
        basic_malloc \
        culling1 culling2 \
        long-time \
+       null \
        thresholds \
        zero
 

Added: branches/MASSIF2/massif/tests/null.c
===================================================================
--- branches/MASSIF2/massif/tests/null.c                                (rev 0)
+++ branches/MASSIF2/massif/tests/null.c        2007-09-23 00:55:20 UTC (rev 
6903)
@@ -0,0 +1,7 @@
+// This test does no allocations, to make sure that case is handled ok (eg.
+// no div-by-zero errors).
+
+int main(void)
+{
+   return 0;
+}

Added: branches/MASSIF2/massif/tests/null.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/null.post.exp                         (rev 0)
+++ branches/MASSIF2/massif/tests/null.post.exp 2007-09-23 00:55:20 UTC (rev 
6903)
@@ -0,0 +1,36 @@
+--------------------------------------------------------------------------------
+Command:            ./null
+Massif arguments:   --stacks=no --time-unit=B
+ms_print arguments: massif.out
+--------------------------------------------------------------------------------
+
+
+1.0 |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+    |                                                                        
+  0 +------------------------------------------------------------------------
+
+
+Number of snapshots: 1
+ Detailed snapshots: []
+--------------------------------------------------------------------------------
+  n        time(B)         total(B)   useful-heap(B) admin-heap(B)    stacks(B)
+--------------------------------------------------------------------------------
+  0              0                0                0             0            0

Added: branches/MASSIF2/massif/tests/null.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/null.stderr.exp                               
(rev 0)
+++ branches/MASSIF2/massif/tests/null.stderr.exp       2007-09-23 00:55:20 UTC 
(rev 6903)
@@ -0,0 +1,2 @@
+
+

Added: branches/MASSIF2/massif/tests/null.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/null.vgtest                           (rev 0)
+++ branches/MASSIF2/massif/tests/null.vgtest   2007-09-23 00:55:20 UTC (rev 
6903)
@@ -0,0 +1,4 @@
+prog: null
+vgopts: --stacks=no --time-unit=B
+post: perl ../../massif/ms_print massif.out
+cleanup: rm massif.out


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
Valgrind-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to