(This is just a marker.) Currently, the libstdc++ testsuite doesn't have any tests for LFS (large file support.) It would probably be a wise idea to add something, just so system integrators could use it as part of toolchain testing. Jakub says: glibc has LFS tests, but I don't think too many of them actually play with > 4GB files but it is trivial, just lseek to 4GB+epsilon, write a few bytes, do the tests, remove the file So, that's something to think about, although the prospects of putting a 4GB+ file on disk, even for a little bit, will no doubt terrify some people. -benjamin
This is an enhancement request.
Hi. This is definitely in my TODO list. I already have the skeleton of a test, adapted from glibc. And, the nice thing is that most modern filesystems support sparse files, this means a 4G+eps file is never *actually* written! Good. I would appreciate help on the following two items, however: 1- When and where running the test? Shall we run it everywhere, XFAILed? Or only on LFS-enabled machines, possibly just wrapping the test in _GLIBCXX_USE_LFS?? Note that 64bit machines may actually be able to access > 4G files even if USE_LFS is not defined! 2- The shell issue! We must make sure the ulimit are Ok when the test is run. This is not the case by default on bash and tcsh.
Subject: Re: LFS tests missing >Hi. This is definitely in my TODO list. I already have the skeleton of a test, >adapted from glibc. And, the nice thing is that most modern filesystems support >sparse files, this means a 4G+eps file is never *actually* written! Good. I figured you were on this: I just wanted to make sure it doesn't get lost. >1- When and where running the test? Shall we run it everywhere, XFAILed? Or only >on LFS-enabled machines, possibly just wrapping the test in _GLIBCXX_USE_LFS?? >Note that 64bit machines may actually be able to access > 4G files even if USE_LFS >is not defined! I think we should only run this test if _GLIBCXX_USE_LFS, regardless of the underlying characteristics of the host os. Probably something like the __enc_filebuf tests. >2- The shell issue! We must make sure the ulimit are Ok when the test is run. This >is not the case by default on bash and tcsh. Yeah, I don't know what to do with this bit. Can't you just use something like __gnu_test::set_memory_limits ? -benjamin
Ok, thanks for your help! I'm assigning the enhancement request to myself...
Subject: Bug 14775 CVSROOT: /cvs/gcc Module name: gcc Changes by: paolo@gcc.gnu.org 2004-04-01 09:16:37 Modified files: libstdc++-v3 : ChangeLog acconfig.h acinclude.m4 config.h.in configure libstdc++-v3/testsuite: testsuite_hooks.cc testsuite_hooks.h Added files: libstdc++-v3/testsuite/27_io/fpos: 14775.cc Log message: 2004-04-01 Paolo Carlini <pcarlini@suse.de> PR libstdc++/14775 * acconfig.h: Rename _GLIBCXX_MEM_LIMITS to _GLIBCXX_RES_LIMITS. * acinclude.m4 (GLIBCXX_CHECK_SETRLIMIT): Call GLIBCXX_CHECK_SETRLIMIT_ancilliary for FSIZE too, adjust define to _GLIBCXX_RES_LIMITS. (GLIBCXX_CHECK_SETRLIMIT_ancilliary): Rename HAVE_MEMLIMIT_* to HAVE_LIMIT_*. * testsuite/testsuite_hooks.h: Declare set_file_limit. * testsuite/testsuite_hooks.cc: Define it, using getrlimit and setrlimit(RLIMIT_FSIZE). * testsuite/27_io/fpos/14775.cc: New. * config.h.in: Regenerate. * configure: Likewise. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2434&r2=1.2435 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/acconfig.h.diff?cvsroot=gcc&r1=1.40&r2=1.41 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/acinclude.m4.diff?cvsroot=gcc&r1=1.287&r2=1.288 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config.h.in.diff?cvsroot=gcc&r1=1.81&r2=1.82 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/configure.diff?cvsroot=gcc&r1=1.383&r2=1.384 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/testsuite_hooks.cc.diff?cvsroot=gcc&r1=1.20&r2=1.21 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/testsuite_hooks.h.diff?cvsroot=gcc&r1=1.26&r2=1.27 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/fpos/14775.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
Paolo, any chance you can add this to gcc-3_4-branch and close out this bug report? best, benjamin
Subject: Bug 14775 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: paolo@gcc.gnu.org 2004-05-14 10:53:26 Modified files: libstdc++-v3 : ChangeLog acconfig.h acinclude.m4 config.h.in configure libstdc++-v3/testsuite: testsuite_hooks.h testsuite_hooks.cc Added files: libstdc++-v3/testsuite/27_io/fpos: 14775.cc Log message: 2004-05-14 Paolo Carlini <pcarlini@suse.de> PR libstdc++/14775 * acconfig.h: Rename _GLIBCXX_MEM_LIMITS to _GLIBCXX_RES_LIMITS. * acinclude.m4 (GLIBCXX_CHECK_SETRLIMIT): Call GLIBCXX_CHECK_SETRLIMIT_ancilliary for FSIZE too, adjust define to _GLIBCXX_RES_LIMITS. (GLIBCXX_CHECK_SETRLIMIT_ancilliary): Rename HAVE_MEMLIMIT_* to HAVE_LIMIT_*. * testsuite/testsuite_hooks.h: Declare set_file_limit. * testsuite/testsuite_hooks.cc: Define it, using getrlimit and setrlimit(RLIMIT_FSIZE). * testsuite/27_io/fpos/14775.cc: New. * config.h.in: Regenerate. * configure: Likewise. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2224.2.99&r2=1.2224.2.100 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/acconfig.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.39.4.1&r2=1.39.4.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/acinclude.m4.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.280.4.3&r2=1.280.4.4 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config.h.in.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.79.4.2&r2=1.79.4.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/configure.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.373.4.6&r2=1.373.4.7 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/testsuite_hooks.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.25.4.1&r2=1.25.4.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/testsuite_hooks.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.19.2.1&r2=1.19.2.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/fpos/14775.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.2.10.1
Fixed for 3.4.1.