[C-MPI-commits] SF.net SVN: c-mpi:[60] test
Status: Pre-Alpha
Brought to you by:
jmwozniak
|
From: <jmw...@us...> - 2010-04-29 20:56:41
|
Revision: 60
http://c-mpi.svn.sourceforge.net/c-mpi/?rev=60&view=rev
Author: jmwozniak
Date: 2010-04-29 20:56:35 +0000 (Thu, 29 Apr 2010)
Log Message:
-----------
Fixes for cmpi/test05
Modified Paths:
--------------
Makefile.in
test/adts/module.mk.in
test/adts/test-dpkm_list.c
test/adts/test-lru_table02.c
test/cmpi/test05.c
Added Paths:
-----------
test/cmpi/test05.zsh
Modified: Makefile.in
===================================================================
--- Makefile.in 2010-04-29 20:55:41 UTC (rev 59)
+++ Makefile.in 2010-04-29 20:56:35 UTC (rev 60)
@@ -281,6 +281,7 @@
$(E)echo LIBS: $(LIBS)
$(E)echo DEPENDS: $(DEPENDS)
$(E)echo OPENSSL: $(OPENSSL_LOCATION)
+ $(E)echo ADT_OBJS: $(ADT_OBJS)
# $(E)echo USE_MPIRPC_1: @USE_MPIRPC_1@
# $(E)echo USE_MPIRPC_2: @USE_MPIRPC_2@
# $(E)echo USE_TABLE_KDA_1: @USE_TABLE_KDA_1@
@@ -338,7 +339,6 @@
TABLE_OBJS := $(KDA_OBJS) $(DENSE_OBJS)
CMPI_OBJS := $(patsubst %.c,%.o, $(filter %.c,$(CMPI_SRC)))
CMPI_OBJS += $(TABLE_OBJS) $(MPIRPC_OBJS) $(DISKSIM_OBJS)
-# CMPI_PICS += src/cmpi/cmpi-io.po
CMPI_DEPS := $(patsubst %.o,%.d,$(CMPI_OBJS))
Modified: test/adts/module.mk.in
===================================================================
--- test/adts/module.mk.in 2010-04-29 20:55:41 UTC (rev 59)
+++ test/adts/module.mk.in 2010-04-29 20:56:35 UTC (rev 60)
@@ -1,6 +1,6 @@
TEST_SRC += $(shell find test/adts -name "*.c")
-test/adts/test%.x: test/adts/test%.o src/mpi_tools/mpi_tools.o $(ADT_OBJS)
+test/adts/test%.x: test/adts/test%.o src/mpi_tools/mpi_tools.o $(CMPI)
$(Q) " LINK $(@) "
$(E)$(MPICC) $(MPE) $(<) src/mpi_tools/mpi_tools.o $(ADT_OBJS) $(LIBS) -o $(@)
Modified: test/adts/test-dpkm_list.c
===================================================================
--- test/adts/test-dpkm_list.c 2010-04-29 20:55:41 UTC (rev 59)
+++ test/adts/test-dpkm_list.c 2010-04-29 20:56:35 UTC (rev 60)
@@ -86,6 +86,11 @@
dpkm_list_tostring(s, 1000, "%i", L);
printf("From string: %s\n", s);
+ struct dpkm_list* L2 = dpkm_list_create(4);
+ char* binary = "data";
+ dpkm_list_add(L2, "binary", binary, strlen(binary)+1);
+ dpkm_list_printdata(L2);
+
/*
dpkm_list_printf("%i", L);
dpkm_list_poll(L);
Modified: test/adts/test-lru_table02.c
===================================================================
--- test/adts/test-lru_table02.c 2010-04-29 20:55:41 UTC (rev 59)
+++ test/adts/test-lru_table02.c 2010-04-29 20:56:35 UTC (rev 60)
@@ -27,9 +27,12 @@
lru_table_add(table, "key2", heap(data2), strlen(data2)+1);
lru_table_printf("%s", table);
- char* overwrite = "XJKLJKL";
+ char* overwrite = "_-_-_";
lru_table_update(table, "key2", overwrite, 3, strlen(overwrite)+1);
+ lru_table_printf("%s", table);
+ overwrite = "X";
+ lru_table_update(table, "key2", overwrite, 1, strlen(overwrite)+1);
lru_table_printf("%s", table);
while ((kv = lru_table_poll(table)))
Modified: test/cmpi/test05.c
===================================================================
--- test/cmpi/test05.c 2010-04-29 20:55:41 UTC (rev 59)
+++ test/cmpi/test05.c 2010-04-29 20:56:35 UTC (rev 60)
@@ -1,45 +1,45 @@
/**
- Put three keys, update one, and get the updated value.
+ Put three keys, update one, and get the updated value.
*/
-#include "test_helpers.h"
+#include "test_helpers.h"
void
cmpi_client_code()
{
char key1[10];
char key2[10];
- char key3[10];
+ char key3[10];
sprintf(key1, "key1_%i", mpi_rank);
sprintf(key2, "key2_%i", mpi_rank);
sprintf(key3, "key3_%i", mpi_rank);
wait_for_notification();
- notify_next();
+ notify_next();
char value[30];
sprintf(value, "value1");
- cmpi_put(key1, value, strlen(value)+1);
+ cmpi_put(key1, value, strlen(value)+1);
printf("FIRST PUT SUCCEEDED\n");
sprintf(value, "value2");
- cmpi_put(key2, value, strlen(value)+1);
+ cmpi_put(key2, value, strlen(value)+1);
printf("SECOND PUT SUCCEEDED\n");
sprintf(value, "value3");
- cmpi_put(key3, value, strlen(value)+1);
+ cmpi_put(key3, value, strlen(value)+1);
printf("THIRD PUT SUCCEEDED\n");
-
- sleep(2);
- cmpi_update(key2, "W", 1, 3);
-
+ sleep(2);
+
+ cmpi_update(key2, "X", 1, 3);
+
char* result;
- int length;
- cmpi_get(key2, &result, &length);
- printf("result: %s\n", result);
- printf("GET SUCCEEDED\n");
-
- sleep(2);
-
- cmpi_shutdown();
+ int length;
+ cmpi_get(key2, &result, &length);
+ printf("result: %s\n", result);
+ printf("GET SUCCEEDED\n");
+
+ sleep(2);
+
+ cmpi_shutdown();
}
Added: test/cmpi/test05.zsh
===================================================================
--- test/cmpi/test05.zsh (rev 0)
+++ test/cmpi/test05.zsh 2010-04-29 20:56:35 UTC (rev 60)
@@ -0,0 +1,37 @@
+#!/bin/zsh
+
+# Be sure to make tests with D=1
+
+# set -x
+
+source tools/test-helpers.zsh
+
+PROGRAM=$1
+OUT=${PROGRAM%.x}.out
+shift
+LAUNCH=${*}
+
+if (( USE_COMM_WORLD == 1 ))
+then
+
+ # Monolithic execution (5 nodes, 1 client):
+
+ mpiexec -n 6 ${PROGRAM} -n 5 -p reps=10 >& ${OUT}
+ CODE=$?
+ [[ ${CODE} == 0 ]] || crash "exit code was: ${CODE}"
+
+else
+
+ # KDA-2B execution:
+
+ tools/startup_nodes.zsh $(( N-1 )) 100 &
+ mpiexec -n 1 test/cmpi/test01.x > CLIENT.out
+ sleep $(( N+15 ))
+
+fi
+
+# Should be 6 "Normal exit."s
+N=$( grep -c "Normal exit." ${OUT} )
+(( N == 6 )) || crash "N != 6"
+
+exit 0
Property changes on: test/cmpi/test05.zsh
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|