From c8762ecddb4e0cc6a9331d1d03e0a52901af08d6 Mon Sep 17 00:00:00 2001 From: mheily Date: Sat, 19 Mar 2011 14:11:59 +0000 Subject: [PATCH] Fix another 32-bit compilation issue git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@457 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7 --- test/main.c | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/test/main.c b/test/main.c index 32c80aa..e8078f0 100644 --- a/test/main.c +++ b/test/main.c @@ -57,50 +57,6 @@ test_kqueue_descriptor_is_pollable(void) close(kq); } -/* - * DEADWOOD: fails on Solaris - * Test if calling fstat() on a socketpair returns unique ino_t and dev_t - * values. This is something that kqueue_gc() relies on. - */ -void -test_fstat_on_socketpair(void) -{ -#ifdef _WIN32 - return; -#else - struct stat sb[4]; - int a[2], b[2]; - int unique = 1; - - if (socketpair(AF_UNIX, SOCK_STREAM, 0, a) < 0) - die("socketpair"); - if (fstat(a[0], &sb[0]) < 0) - die("fstat"); - if (fstat(a[1], &sb[1]) < 0) - die("fstat"); - if (sb[0].st_ino == sb[1].st_ino) { - printf(" inodes=%zu %zu\n", sb[0].st_ino, sb[1].st_ino); - die("NO, inode numbers are not unique"); - } - close(a[0]); - close(a[1]); - if (socketpair(AF_UNIX, SOCK_STREAM, 0, b) < 0) - die("socketpair"); - if (fstat(b[0], &sb[2]) < 0) - die("fstat"); - if (fstat(b[1], &sb[3]) < 0) - die("fstat"); - if (sb[0].st_ino == sb[2].st_ino || sb[0].st_ino == sb[3].st_ino) - unique = 0; - if (sb[1].st_ino == sb[2].st_ino || sb[1].st_ino == sb[3].st_ino) - unique = 0; - printf(" inodes=%zu %zu %zu %zu\n", - sb[0].st_ino, sb[1].st_ino, sb[2].st_ino, sb[3].st_ino); - if (!unique) - die("ERROR - inode numbers are not unique"); -#endif -} - /* * Test the method for detecting when one end of a socketpair * has been closed. This technique is used in kqueue_validate() @@ -224,7 +180,6 @@ main(int argc, char **argv) testing_begin(); test(peer_close_detection); - //DEADWOOD:test(fstat_on_socketpair); test(kqueue);