public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH] Sort find result of hardlink.sh test.
  2019-01-01  0:00 ` Jakub Jelinek
@ 2019-01-01  0:00   ` Mark Wielaard
  2019-01-01  0:00     ` Jakub Jelinek
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Wielaard @ 2019-01-01  0:00 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: dwz

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

On Sun, Mar 03, 2019 at 10:45:59PM +0100, Jakub Jelinek wrote:
> Maybe there should also export LC_ALL=C in check: in Makefile,
> so that there aren't any differences based on selected language?

Good idea. Added as attached.

Cheers,

Mark

[-- Attachment #2: 0001-Add-export-LC_ALL-C-to-make-check.patch --]
[-- Type: text/x-diff, Size: 829 bytes --]

From 5af44e055dee8cd13e9b987adfef32bbb4d46ad9 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Sun, 3 Mar 2019 23:52:44 +0100
Subject: [PATCH] Add export LC_ALL=C to make check.

Make sure there are no sorting differences by exporting LC_ALL=C.

    2019-03-03  Mark Wielaard  <mark@klomp.org>

	* Makefile (check): Add export LC_ALL=C.
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index bc51ca2..b318fd7 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,6 @@ hello:
 check: dwz $(TEST_EXECS)
 	mkdir -p testsuite-bin
 	cd testsuite-bin; ln -sf $(PWD)/dwz .
-	export PATH=$(PWD)/testsuite-bin:$$PATH; \
+	export PATH=$(PWD)/testsuite-bin:$$PATH; export LC_ALL=C; \
 	runtest --tool=dwz -srcdir testsuite
 	rm -Rf testsuite-bin $(TEST_EXECS)
-- 
2.20.1


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

* Re: [PATCH] Sort find result of hardlink.sh test.
  2019-01-01  0:00 [PATCH] Sort find result of hardlink.sh test Mark Wielaard
@ 2019-01-01  0:00 ` Jakub Jelinek
  2019-01-01  0:00   ` Mark Wielaard
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2019-01-01  0:00 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: dwz

On Sun, Mar 03, 2019 at 09:52:21PM +0100, Mark Wielaard wrote:
> Find can return results in arbitrary order. Sort the output of find
> to make sure the test doesn't spuriously fails. The same isn't necessary
> for ls, which sorts the file list by default.

Ok, thanks.

Maybe there should also export LC_ALL=C in check: in Makefile,
so that there aren't any differences based on selected language?

> 2019-03-03  Mark Wielaard  <mark@klomp.org>
> 
> 	* testsuite/dwz.tests/hardlink.sh: Sort find output.

	Jakub

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

* Re: [PATCH] Sort find result of hardlink.sh test.
  2019-01-01  0:00   ` Mark Wielaard
@ 2019-01-01  0:00     ` Jakub Jelinek
  0 siblings, 0 replies; 4+ messages in thread
From: Jakub Jelinek @ 2019-01-01  0:00 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: dwz

On Sun, Mar 03, 2019 at 11:56:08PM +0100, Mark Wielaard wrote:
> On Sun, Mar 03, 2019 at 10:45:59PM +0100, Jakub Jelinek wrote:
> > Maybe there should also export LC_ALL=C in check: in Makefile,
> > so that there aren't any differences based on selected language?
> 
> Good idea. Added as attached.
> 
> Cheers,
> 
> Mark

> >From 5af44e055dee8cd13e9b987adfef32bbb4d46ad9 Mon Sep 17 00:00:00 2001
> From: Mark Wielaard <mark@klomp.org>
> Date: Sun, 3 Mar 2019 23:52:44 +0100
> Subject: [PATCH] Add export LC_ALL=C to make check.
> 
> Make sure there are no sorting differences by exporting LC_ALL=C.
> 
>     2019-03-03  Mark Wielaard  <mark@klomp.org>
> 
> 	* Makefile (check): Add export LC_ALL=C.

Ok, thanks.

	Jakub

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

* [PATCH] Sort find result of hardlink.sh test.
@ 2019-01-01  0:00 Mark Wielaard
  2019-01-01  0:00 ` Jakub Jelinek
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Wielaard @ 2019-01-01  0:00 UTC (permalink / raw)
  To: dwz; +Cc: Mark Wielaard

Find can return results in arbitrary order. Sort the output of find
to make sure the test doesn't spuriously fails. The same isn't necessary
for ls, which sorts the file list by default.

2019-03-03  Mark Wielaard  <mark@klomp.org>

	* testsuite/dwz.tests/hardlink.sh: Sort find output.
---
 testsuite/dwz.tests/hardlink.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuite/dwz.tests/hardlink.sh b/testsuite/dwz.tests/hardlink.sh
index de339b9..e3213a3 100755
--- a/testsuite/dwz.tests/hardlink.sh
+++ b/testsuite/dwz.tests/hardlink.sh
@@ -10,7 +10,7 @@ dwz -h 1 2
 smaller-than.sh 1 ../hello
 smaller-than.sh 2 ../hello
 
-hl="$(find -samefile 1)"
+hl="$(find -samefile 1 | sort)"
 hl="$(echo $hl)"
 [ "$hl" = "./1 ./2" ]
 
-- 
2.20.1

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

end of thread, other threads:[~2019-03-03 22:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01  0:00 [PATCH] Sort find result of hardlink.sh test Mark Wielaard
2019-01-01  0:00 ` Jakub Jelinek
2019-01-01  0:00   ` Mark Wielaard
2019-01-01  0:00     ` Jakub Jelinek

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).