Bug 14775 - [3.4 only] LFS tests missing
Summary: [3.4 only] LFS tests missing
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.0.0
: P2 enhancement
Target Milestone: 3.4.1
Assignee: Paolo Carlini
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-29 19:10 UTC by Benjamin Kosnik
Modified: 2004-05-14 10:55 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2004-03-29 20:00:16


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Kosnik 2004-03-29 19:10:47 UTC
(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
Comment 1 Benjamin Kosnik 2004-03-29 19:11:30 UTC
This is an enhancement request.
Comment 2 Paolo Carlini 2004-03-29 19:33:54 UTC
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.
Comment 3 Benjamin Kosnik 2004-03-29 19:50:59 UTC
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
Comment 4 Paolo Carlini 2004-03-29 20:00:15 UTC
Ok, thanks for your help! I'm assigning the enhancement request to myself...
Comment 5 GCC Commits 2004-04-01 09:16:44 UTC
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

Comment 6 Benjamin Kosnik 2004-05-13 20:29:05 UTC
Paolo, any chance you can add this to gcc-3_4-branch and close out this bug report?

best,
benjamin
Comment 7 GCC Commits 2004-05-14 10:53:31 UTC
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

Comment 8 Paolo Carlini 2004-05-14 10:55:25 UTC
Fixed for 3.4.1.