mirror of
https://github.com/darlinghq/darling-libkqueue.git
synced 2024-11-23 11:49:50 +00:00
Fix another 32-bit compilation issue
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@457 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
parent
8ce2f93c30
commit
c8762ecddb
45
test/main.c
45
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user