[C-MPI-commits] SF.net SVN: c-mpi:[135] test/mpirpc
Status: Pre-Alpha
Brought to you by:
jmwozniak
|
From: <jmw...@us...> - 2010-05-20 20:27:24
|
Revision: 135
http://c-mpi.svn.sourceforge.net/c-mpi/?rev=135&view=rev
Author: jmwozniak
Date: 2010-05-20 20:27:18 +0000 (Thu, 20 May 2010)
Log Message:
-----------
Put DMALLOC into a couple more tests
Modified Paths:
--------------
include/mpi_tools.h
test/adts/test-inlist.c
test/mpirpc/test-blob.c
Modified: include/mpi_tools.h
===================================================================
--- include/mpi_tools.h 2010-05-20 20:09:39 UTC (rev 134)
+++ include/mpi_tools.h 2010-05-20 20:27:18 UTC (rev 135)
@@ -343,6 +343,7 @@
void dmalloc_setup(void);
#else
#define DMALLOC_SETUP(x)
+#define dmalloc_setup(x)
#endif
/**
Modified: test/adts/test-inlist.c
===================================================================
--- test/adts/test-inlist.c 2010-05-20 20:09:39 UTC (rev 134)
+++ test/adts/test-inlist.c 2010-05-20 20:27:18 UTC (rev 135)
@@ -5,23 +5,27 @@
#include <inlist.h>
+#include "test_helpers.h"
+
int
main(int argc, char* argv[])
{
MPI_Init(&argc, &argv);
whoami();
- char* s = malloc(30);
- strcpy(s, " 1 4 2 ");
+ dmalloc_setup();
+ char* s = " 1 4 2 ";
+
struct inlist* L = inlist_parse(s);
inlist_printf(L);
inlist_free(L);
- free(s);
MPI_Finalize();
+ TEST_DMALLOC;
+
return 0;
}
Modified: test/mpirpc/test-blob.c
===================================================================
--- test/mpirpc/test-blob.c 2010-05-20 20:09:39 UTC (rev 134)
+++ test/mpirpc/test-blob.c 2010-05-20 20:27:18 UTC (rev 135)
@@ -7,6 +7,8 @@
#include <mpirpc.h>
+#include "test_helpers.h"
+
void
handle_test(MPIRPC_Node caller, int unique, char* args,
char* blob, int blob_length)
@@ -64,10 +66,7 @@
MPIRPC_Finalize();
MPI_Finalize();
- DMALLOC_SETUP(if (mpi_rank == 0)
- {
- SHOW_S(dmalloc_logpath);
- dmalloc_shutdown();
- });
+ TEST_DMALLOC;
+
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|