Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/test/sysproxy remove obsolete tests
details: https://anonhg.NetBSD.org/src/rev/d1ca25ecf26f
branches: trunk
changeset: 758232:d1ca25ecf26f
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Oct 27 20:46:54 2010 +0000
description:
remove obsolete tests
diffstat:
sys/rump/librump/test/sysproxy/client/Makefile | 9 -
sys/rump/librump/test/sysproxy/client/sysproxy_client.c | 65 -----------
sys/rump/librump/test/sysproxy/serv/Makefile | 10 -
sys/rump/librump/test/sysproxy/serv/sysproxy_serv.c | 95 -----------------
4 files changed, 0 insertions(+), 179 deletions(-)
diffs (195 lines):
diff -r 5ba1f007ef88 -r d1ca25ecf26f sys/rump/librump/test/sysproxy/client/Makefile
--- a/sys/rump/librump/test/sysproxy/client/Makefile Wed Oct 27 20:44:49 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-# $NetBSD: Makefile,v 1.1 2009/04/29 17:51:47 pooka Exp $
-#
-
-PROG= sysproxy_client
-NOMAN=
-
-LDADD+= -lrumpvfs -lrump -lrumpuser -lpthread
-
-.include <bsd.prog.mk>
diff -r 5ba1f007ef88 -r d1ca25ecf26f sys/rump/librump/test/sysproxy/client/sysproxy_client.c
--- a/sys/rump/librump/test/sysproxy/client/sysproxy_client.c Wed Oct 27 20:44:49 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/un.h>
-
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-
-#include <rump/rump.h>
-#include <rump/rump_syscalls.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define SERVPATH "/tmp/rump_sysproxy_test"
-#define USE_UN
-
-int
-main()
-{
- struct stat sb[3];
- int s, error;
- size_t len;
- int i;
-
-#ifdef USE_UN
- struct sockaddr_un sun;
-
- s = socket(AF_LOCAL, SOCK_STREAM, 0);
- if (s == -1)
- err(1, "socket");
-
- memset(&sun, 0, sizeof(sun));
- sun.sun_family = AF_LOCAL;
- strcpy(sun.sun_path, SERVPATH);
- if (connect(s, (struct sockaddr *)&sun, SUN_LEN(&sun)) == -1)
- err(1, "connect");
-#else
- struct sockaddr_in sin;
- int x = 1;
-
- s = socket(AF_INET, SOCK_STREAM, 0);
- if (s == -1)
- err(1, "socket");
-
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- sin.sin_port = htons(12345);
- sin.sin_addr.s_addr = inet_addr("10.181.181.1");
- if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) == -1)
- err(1, "connect");
-
- if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &x, sizeof(x)) == -1)
- err(1, "setsockopt");
-#endif
-
- rump_init();
- rump_sysproxy_socket_setup_client(s);
-
- if (rump_sys_stat("/", &sb[1]) == -1)
- err(1, "stat");
-}
diff -r 5ba1f007ef88 -r d1ca25ecf26f sys/rump/librump/test/sysproxy/serv/Makefile
--- a/sys/rump/librump/test/sysproxy/serv/Makefile Wed Oct 27 20:44:49 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-# $NetBSD: Makefile,v 1.1 2009/04/29 17:51:47 pooka Exp $
-#
-
-PROG= sysproxy_serv
-NOMAN=
-
-LDADD+= -lrump -lrumpuser -lpthread
-LDADD+= -lrumpvfs
-
-.include <bsd.prog.mk>
diff -r 5ba1f007ef88 -r d1ca25ecf26f sys/rump/librump/test/sysproxy/serv/sysproxy_serv.c
--- a/sys/rump/librump/test/sysproxy/serv/sysproxy_serv.c Wed Oct 27 20:44:49 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <netinet/in.h>
-
-#include <rump/rump.h>
-
-#include <signal.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#define SERVPATH "/tmp/rump_sysproxy_test"
-#define USE_UN
-
-static void
-cleanup()
-{
-
- unlink(SERVPATH);
-}
-
-static void
-sigint(int sig)
-{
-
- cleanup();
- _exit(0);
-}
-
-static void
-sigabrt(int sig)
-{
-
- cleanup();
- abort();
-}
-
-int
-main()
-{
- socklen_t slen;
- int s, s2;
-
-#ifdef USE_UN
- struct sockaddr_un sun;
-
- s = socket(AF_LOCAL, SOCK_STREAM, 0);
- if (s == -1)
- err(1, "socket");
-
- memset(&sun, 0, sizeof(sun));
- sun.sun_family = AF_LOCAL;
- strcpy(sun.sun_path, SERVPATH);
- if (bind(s, (struct sockaddr *)&sun, SUN_LEN(&sun)) == -1)
- err(1, "bind");
- atexit(cleanup);
- signal(SIGINT, sigint);
- signal(SIGSEGV, sigabrt);
- if (listen(s, 1) == -1)
- err(1, "listen");
- slen = sizeof(sun);
- s2 = accept(s, (struct sockaddr *)&sun, &slen);
- if (s2 == -1)
- err(1, "accept");
-#else
- struct sockaddr_in sin;
-
- s = socket(AF_INET, SOCK_STREAM, 0);
- if (s == -1)
- err(1, "socket");
-
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- sin.sin_port = htons(12345);
- sin.sin_addr.s_addr = INADDR_ANY;
-
- if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) == -1)
- err(1, "bind");
- if (listen(s, 1) == -1)
- err(1, "listen");
- slen = sizeof(sin);
- s2 = accept(s, (struct sockaddr *)&sin, &slen);
- if (s2 == -1)
- err(1, "accept");
-#endif
-
- rump_init();
- rump_sysproxy_socket_setup_server(s2);
-
- pause();
-
- return 0;
-}
Home |
Main Index |
Thread Index |
Old Index