ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] du01.sh: Fix broken directory change
@ 2022-08-30 14:24 Martin Doucha
  2022-08-30 14:24 ` [LTP] [PATCH 2/2] du01.sh: Avoid l10n issues Martin Doucha
  2022-08-31 12:34 ` [LTP] [PATCH 1/2] du01.sh: Fix broken directory change Cyril Hrubis
  0 siblings, 2 replies; 3+ messages in thread
From: Martin Doucha @ 2022-08-30 14:24 UTC (permalink / raw)
  To: ltp

Running `ROD cd dir` doesn't work because the command will be executed
in a subshell. Change the directory correctly.

Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---

After this fix, my older tst_rod patch can be safely merged.

 testcases/commands/du/du01.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/commands/du/du01.sh b/testcases/commands/du/du01.sh
index 274e32a4e..5548d7667 100755
--- a/testcases/commands/du/du01.sh
+++ b/testcases/commands/du/du01.sh
@@ -14,7 +14,7 @@ TST_NEEDS_CMDS="dd du stat"
 setup()
 {
 	ROD_SILENT mkdir basedir
-	ROD_SILENT cd basedir
+	cd basedir || tst_brk TBROK "cd basedir failed"
 
 	ROD_SILENT dd if=/dev/zero of=testfile bs=1M count=10
 
-- 
2.37.2


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* [LTP] [PATCH 2/2] du01.sh: Avoid l10n issues
  2022-08-30 14:24 [LTP] [PATCH 1/2] du01.sh: Fix broken directory change Martin Doucha
@ 2022-08-30 14:24 ` Martin Doucha
  2022-08-31 12:34 ` [LTP] [PATCH 1/2] du01.sh: Fix broken directory change Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Doucha @ 2022-08-30 14:24 UTC (permalink / raw)
  To: ltp

Some du01.sh subtests are language dependent. Prevent failures on
non-English systems by setting test locale to C.

Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
 testcases/commands/du/du01.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/testcases/commands/du/du01.sh b/testcases/commands/du/du01.sh
index 5548d7667..7977fd461 100755
--- a/testcases/commands/du/du01.sh
+++ b/testcases/commands/du/du01.sh
@@ -27,6 +27,9 @@ setup()
 	# BLOCKSIZE environment variables. Here we need to
 	# set DU_BLOCK_SIZE to 1024 to ensure the result is expected.
 	export DU_BLOCK_SIZE=1024
+
+	# Some subtests are language dependent
+	export LC_ALL=C
 }
 
 du_test()
-- 
2.37.2


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/2] du01.sh: Fix broken directory change
  2022-08-30 14:24 [LTP] [PATCH 1/2] du01.sh: Fix broken directory change Martin Doucha
  2022-08-30 14:24 ` [LTP] [PATCH 2/2] du01.sh: Avoid l10n issues Martin Doucha
@ 2022-08-31 12:34 ` Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2022-08-31 12:34 UTC (permalink / raw)
  To: Martin Doucha; +Cc: ltp

Hi!
Both pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2022-08-31 12:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 14:24 [LTP] [PATCH 1/2] du01.sh: Fix broken directory change Martin Doucha
2022-08-30 14:24 ` [LTP] [PATCH 2/2] du01.sh: Avoid l10n issues Martin Doucha
2022-08-31 12:34 ` [LTP] [PATCH 1/2] du01.sh: Fix broken directory change Cyril Hrubis

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 NNTP newsgroup(s).