public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
* gnu/testlet/java/nio/channels/FileChannel/manyopen.java broken
@ 2004-10-08  6:35 Noa Resare
  2004-10-08  6:47 ` Stephen Crawley
  0 siblings, 1 reply; 7+ messages in thread
From: Noa Resare @ 2004-10-08  6:35 UTC (permalink / raw)
  To: Mauve Discuss

gnu/testlet/java/nio/channels/FileChannel/manyopen.java tries to open
1024 * 3 files and signals failure if that fails.

I don't think it can be considered an error if this fails, especially
since many popular operating systems limit the number open files that a
single process can have:

Here is the output of "ulimit -n" on some boxes I have access to:

OpenBSD 3.4 x86: 64
Solaris 9 sparc: 256
Linux (debian 2.2 x86/suse 8 AMD64/Fedora core 1/2/3) : 1024
FreeBSD 4.10-BETA: 7322
NetBSD 1.6.1: 64
OSX 10.2: 256

Since the test doesn't actually test for anything other than the ability
to open many files and the extent of that ability isn't specified in any
spec that I'm aware of I suggest that we remove the test.

/noa

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: gnu/testlet/java/nio/channels/FileChannel/manyopen.java broken
@ 2004-10-11  6:39 Jeroen Frijters
  0 siblings, 0 replies; 7+ messages in thread
From: Jeroen Frijters @ 2004-10-11  6:39 UTC (permalink / raw)
  To: Stephen Crawley, Mark Wielaard
  Cc: Noa Resare, Mauve Discuss, crawley, crawley

Stephen Crawley wrote:
> Java programs that rely on the GC to find / close file handles are
> non-portable and (IMO) broken.  A portable program cannot depend on
> the GC running soon enough to get around a problem with running
> out of file descriptors.

While I agree with your general point (and that this test shouldn't be
in Mauve), I would like to add a small footnote:

The nio memory mapped file API *requires* you to rely on the GC to close
the files.

Personally, I happen to think that the API is broken because of this,
but as of 1.4 (haven't looked at 1.5 yet) this is the sad reality.

Regards,
Jeroen

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-10-11  6:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-08  6:35 gnu/testlet/java/nio/channels/FileChannel/manyopen.java broken Noa Resare
2004-10-08  6:47 ` Stephen Crawley
2004-10-08 10:05   ` Mark Wielaard
2004-10-08 11:07     ` Noa Resare
2004-10-08 17:00     ` Thomas Zander
2004-10-11  0:50     ` Stephen Crawley
2004-10-11  6:39 Jeroen Frijters

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).