diff mbox

[1/2] Separate ftell from fseek logic and avoid modifying FILE data (#16532)

Message ID mvmeh1qmrje.fsf@hawking.suse.de
State New
Headers show

Commit Message

Andreas Schwab March 25, 2014, 11:44 a.m. UTC
Siddhesh Poyarekar <siddhesh@redhat.com> writes:

> diff --git a/libio/Makefile b/libio/Makefile
> index 22dbcae..488ee51 100644
> --- a/libio/Makefile
> +++ b/libio/Makefile
> @@ -60,7 +60,7 @@ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc   \
>  	tst-wmemstream1 tst-wmemstream2 \
>  	bug-memstream1 bug-wmemstream1 \
>  	tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos tst-fseek \
> -	tst-fwrite-error tst-ftell-partial-wide
> +	tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler
>  ifeq (yes,$(build-shared))
>  # Add test-fopenloc only if shared library is enabled since it depends on
>  # shared localedata objects.

You need to set up LOCPATH so that the tests can find their locales.
Installed as obvious.

Andreas.

	* libio/Makefile (tst-ftell-partial-wide-ENV)
	(tst-ftell-active-handler-ENV): Define.

Comments

Siddhesh Poyarekar March 25, 2014, 11:50 a.m. UTC | #1
On Tue, Mar 25, 2014 at 12:44:21PM +0100, Andreas Schwab wrote:
> > -	tst-fwrite-error tst-ftell-partial-wide
> > +	tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler
> >  ifeq (yes,$(build-shared))
> >  # Add test-fopenloc only if shared library is enabled since it depends on
> >  # shared localedata objects.
> 
> You need to set up LOCPATH so that the tests can find their locales.
> Installed as obvious.

Thanks!

I wonder if it would be useful to set LOCPATH all the time so that we
don't have to bother with doing it for individual tests.

Siddhesh
Mike Frysinger March 27, 2014, 7:38 a.m. UTC | #2
On Tue 25 Mar 2014 17:20:32 Siddhesh Poyarekar wrote:
> On Tue, Mar 25, 2014 at 12:44:21PM +0100, Andreas Schwab wrote:
> > > -	tst-fwrite-error tst-ftell-partial-wide
> > > +	tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler
> > > 
> > >  ifeq (yes,$(build-shared))
> > >  # Add test-fopenloc only if shared library is enabled since it depends
> > >  on
> > >  # shared localedata objects.
> > 
> > You need to set up LOCPATH so that the tests can find their locales.
> > Installed as obvious.
> 
> I wonder if it would be useful to set LOCPATH all the time so that we
> don't have to bother with doing it for individual tests.

seems reasonable to move into the main testrunner logic
-mike
diff mbox

Patch

diff --git a/libio/Makefile b/libio/Makefile
index 69c25c0..cca0345 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -158,6 +158,8 @@  tst-swscanf-ENV = LOCPATH=$(common-objpfx)localedata
 bug-ftell-ENV = LOCPATH=$(common-objpfx)localedata
 tst-fgetwc-ENV = LOCPATH=$(common-objpfx)localedata
 tst-fseek-ENV = LOCPATH=$(common-objpfx)localedata
+tst-ftell-partial-wide-ENV = LOCPATH=$(common-objpfx)localedata
+tst-ftell-active-handler-ENV = LOCPATH=$(common-objpfx)localedata
 
 generated += tst-fopenloc.mtrace tst-fopenloc.check