summaryrefslogtreecommitdiff
path: root/source3/tests
diff options
context:
space:
mode:
Diffstat (limited to 'source3/tests')
-rw-r--r--source3/tests/sgi_sysv_hack.c46
-rw-r--r--source3/tests/summary.c4
-rw-r--r--source3/tests/sysv_ipc.c88
3 files changed, 0 insertions, 138 deletions
diff --git a/source3/tests/sgi_sysv_hack.c b/source3/tests/sgi_sysv_hack.c
deleted file mode 100644
index 0fb16f11f8..0000000000
--- a/source3/tests/sgi_sysv_hack.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* this tests if we need to define SGI_SEMUN_HACK
- if we're using gcc on IRIX 6.5.x. */
-
-#if defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <sys/sem.h>
-
-#ifndef HAVE_UNION_SEMUN
-union semun {
- int val;
- struct semid_ds *buf;
- unsigned short *array;
-};
-#endif
-
-union semun_hack {
- int val;
- struct semid_ds *buf;
- unsigned short *array;
- char __dummy[5];
-};
-
-main() {
- struct semid_ds sem_ds;
- union semun_hack suh;
- union semun su;
- int sem_id, ret;
-
- ret = 1;
- sem_id = semget(0xdead6666,1,IPC_CREAT|IPC_EXCL|0777);
- su.buf = &sem_ds;
- suh.buf = &sem_ds;
- if (sem_id != -1) {
- if ((semctl(sem_id, 0, IPC_STAT, su) == -1) &&
- (semctl(sem_id, 0, IPC_STAT, suh) != -1)) {
- ret = 0;
- }
- }
- semctl(sem_id, 0, IPC_RMID, 0);
- return ret;
-}
diff --git a/source3/tests/summary.c b/source3/tests/summary.c
index 7ff9ea61c9..79a530b013 100644
--- a/source3/tests/summary.c
+++ b/source3/tests/summary.c
@@ -7,10 +7,6 @@ main()
exit(1);
#endif
-#if !(defined(HAVE_SYSV_IPC) || defined(HAVE_SHARED_MMAP))
- printf("WARNING: no shared memory. Running with slow locking code\n");
-#endif
-
#if !(defined(HAVE_IFACE_IFCONF) || defined(HAVE_IFACE_IFREQ) || defined(HAVE_IFACE_AIX))
printf("WARNING: No automated network interface determination\n");
#endif
diff --git a/source3/tests/sysv_ipc.c b/source3/tests/sysv_ipc.c
deleted file mode 100644
index 9f0e20957a..0000000000
--- a/source3/tests/sysv_ipc.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* this tests whether we can use a sysv shared memory segment
- as needed for the sysv varient of FAST_SHARE_MODES */
-
-#if defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <sys/sem.h>
-
-#define KEY 0x963796
-#define SEMKEY 0x963797
-#define SIZE (32*1024)
-
-#ifndef HAVE_UNION_SEMUN
-union semun {
- int val;
- struct semid_ds *buf;
- unsigned short *array;
-};
-#endif
-
-
-main()
-{
- int id, sem_id;
- int *buf;
- int count=7;
- union semun su;
-
-#ifdef LINUX
- if (sizeof(struct shmid_ds) == 52) {
- printf("WARNING: You probably have a broken set of glibc2 include files - disabling sysv shared memory\n");
- exit(1);
- }
-#endif
-
-
- sem_id = semget(SEMKEY, 1, IPC_CREAT|IPC_EXCL|0600);
-
- if (sem_id == -1) exit(1);
-
- su.val = 1;
- semctl(sem_id, 0, IPC_RMID, su);
-
- id = shmget(KEY, 0, 0);
- if (id != -1) {
- if (shmctl(id, IPC_RMID, 0) != 0) exit(1);
- }
-
- if (fork() == 0) {
- /* uggh - need locking */
- sleep(2);
-
- /* get an existing area */
- id = shmget(KEY, 0, 0);
- if (id == -1) exit(1);
-
- buf = (int *)shmat(id, 0, 0);
- if (buf == (int *)-1) exit(1);
-
-
- while (count-- && buf[6124] != 55732) sleep(1);
-
- if (count <= 0) exit(1);
-
- buf[1763] = 7268;
- exit(0);
- }
-
- id = shmget(KEY, SIZE, IPC_CREAT | IPC_EXCL | 0600);
- if (id == -1) exit(1);
-
- buf = (int *)shmat(id, 0, 0);
-
- if (buf == (int *)-1) exit(1);
-
- buf[6124] = 55732;
-
- while (count-- && buf[1763] != 7268) sleep(1);
-
- shmctl(id, IPC_RMID, 0);
-
- if (count <= 0) exit(1);
- exit(0);
-}