* $Header$
*
* Copyright (C) 1987 by the Massachusetts Institute of Technology
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
*
*/
static char *rcsid_test_c = "$Header$";
#endif lint
+#include <mit-copyright.h>
#include <stdio.h>
#include <sys/file.h>
#include <ctype.h>
com_err(whoami, status, 0);
exit(1);
}
+ exit(0);
}
test_noop()
sending_version_no = SMS_VERSION_1;
}
-test_connect()
+test_connect(argc, argv)
+int argc;
+char *argv[];
{
- int status = sms_connect();
+ char *server = "", serverbuf[256], *index();
+ int status;
+
+ if (argc > 1) {
+ server = argv[1];
+ if (index(server, ':') == NULL) {
+ server = serverbuf;
+ sprintf(serverbuf, "%s:%s", argv[1], "sms_db");
+ }
+ }
+ status = sms_connect(server);
if (status) ss_perror(ss, status, 0);
}
return rtn;
}
-test_shutdown(argc, argv)
- int argc;
- char **argv;
-{
- char *reason = NULL;
- int status, i;
-
- if (argc < 2) {
- ss_perror(ss, 0, "Usage: shutdown reason ...");
- return;
- }
-
- for (i = 1 ; i < argc; i++) {
- if (i != 1) reason = concat(reason, " ");
- reason = concat(reason, argv[i]);
- }
- status = sms_shutdown(reason);
- if (status) ss_perror(ss, status, 0);
-}
static int count;
}
printf("\n");
count++;
+ return(SMS_CONT);
}
test_query(argc, argv)
status = sms_access(argv[1], argc-2, argv+2);
if (status) ss_perror(ss, status, 0);
}
+
+
+test_dcm(argc, argv)
+ int argc;
+ char **argv;
+{
+ int status;
+
+ if (status = sms_do_update())
+ ss_perror(ss, status, " while triggering dcm");
+}