Skip to contentSkip to conversation

master - tests: aux.sh use subshell for simple redirection

PATCH Zdenek Kabelac 1 participant 1 message Jun 30, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c31614eccc41746734e712143d0f86c96f95dd4c
Commit:        c31614eccc41746734e712143d0f86c96f95dd4c
Parent:        57779e39eccf456344fa4a51ddfc49cee41a40d7
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Jun 30 14:35:42 2017 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Jun 30 17:08:47 2017 +0200

tests: aux.sh use subshell for simple redirection

---
 test/lib/utils.sh |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
test/lib/utils.sh +5 -3
index 2b5b782..f4c52ad 100644
@@ -131,9 +131,11 @@ STACKTRACE() {
 
 	# Get backtraces from coredumps
 	if which gdb &>/dev/null; then
-		echo bt full > gdb_commands.txt
-		echo l >> gdb_commands.txt
-		echo quit >> gdb_commands.txt
+		{
+			echo bt full
+			echo l
+			echo quit
+		} > gdb_commands.txt
 		# TODO: use sysctl to get 'core' position in system
 		for i in core*; do
 			test -f "$i" || break   # empty globbing