[C-MPI-commits] SF.net SVN: c-mpi:[77]
Status: Pre-Alpha
Brought to you by:
jmwozniak
|
From: <jmw...@us...> - 2010-05-07 14:48:11
|
Revision: 77
http://c-mpi.svn.sourceforge.net/c-mpi/?rev=77&view=rev
Author: jmwozniak
Date: 2010-05-07 14:48:05 +0000 (Fri, 07 May 2010)
Log Message:
-----------
New test and header.
Added Paths:
-----------
include/cmpi-types.h
test/cmpi-db/test-cp1.zsh
Added: include/cmpi-types.h
===================================================================
--- include/cmpi-types.h (rev 0)
+++ include/cmpi-types.h 2010-05-07 14:48:05 UTC (rev 77)
@@ -0,0 +1,39 @@
+
+#define CMPI_KEY_LENGTH 64
+#define CMPI_VALUE_LENGTH (64*1024)
+
+/**
+ CMPI method return error codes.
+*/
+typedef enum
+{
+ /**
+ Successful return code.
+ */
+ CMPI_SUCCESS,
+
+ /**
+ Record does not exist.
+ */
+ CMPI_DOESNT_EXIST,
+
+ /**
+ Query target is in a fault state.
+ */
+ CMPI_ERROR_FAULT,
+
+ /**
+ Unknown error.
+ */
+ CMPI_ERROR_UNKNOWN,
+
+ /**
+ Could not find port to attach.
+ */
+ CMPI_ERROR_SERVICENAME,
+
+ /**
+ Insufficient neighbors or poorly connected network.
+ */
+ CMPI_ERROR_NEIGHBORS
+} CMPI_RETURN;
Added: test/cmpi-db/test-cp1.zsh
===================================================================
--- test/cmpi-db/test-cp1.zsh (rev 0)
+++ test/cmpi-db/test-cp1.zsh 2010-05-07 14:48:05 UTC (rev 77)
@@ -0,0 +1,52 @@
+#!/bin/zsh
+
+# Be sure to make tests with D=1
+
+# set -x
+
+OUT=$1
+PROCS=$2
+NODES=$3
+
+source tools/test-helpers.zsh
+
+mpiexec -n ${PROCS} bin/cmpi-db -n ${NODES} >& ${OUT} &
+MPI_PROCESS=$!
+
+sleep ${PROCS}
+
+echo "DATA" > test-cp1.input.data
+echo "cmpi-cp insert" >& cmpi-cp.out
+bin/cmpi-cp test-cp1.input.data dht://test-cp1 >>& cmpi-cp.out
+if [[ $? != 0 ]]
+then
+ cat cmpi-cp.out
+ rm -v cmpi-cp.out
+ crash "cmpi-cp error!"
+fi
+
+echo inserted
+
+echo "\n\ncmpi-cp retrieve" >>& cmpi-cp.out
+bin/cmpi-cp dht://test-cp1 test-cp1.output.data >>& cmpi-cp.out
+if [[ $? != 0 ]]
+then
+ cat cmpi-cp.out
+ rm -v cmpi-cp.out
+ crash "cmpi-cp error!"
+fi
+
+echo retrieved
+
+bin/cmpi-db-fifo-quit >& /dev/null &
+QUIT_PROCESS=$!
+
+sleep ${PROCS}
+
+# Should be ${PROCS} "Normal exit."s
+N=$( grep -c "Normal exit." ${OUT} )
+(( N == PROCS )) || crash "N != ${PROCS}"
+
+# rm cmpi-cp.out test-cp1.*.data
+
+exit 0
Property changes on: test/cmpi-db/test-cp1.zsh
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|