All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: master - tests: printf to awk
Date: Fri, 18 Sep 2020 15:31:15 +0000 (GMT)	[thread overview]
Message-ID: <20200918153115.B919E396EC88@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4b07ae55f1a1e7ad33b2fb0067112ed074f30bf4
Commit:        4b07ae55f1a1e7ad33b2fb0067112ed074f30bf4
Parent:        9fbcba1c40eb5256f262e3442ade42e53dcb88d0
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Fri Sep 18 17:27:17 2020 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Sep 18 17:30:45 2020 +0200

tests:  printf to awk

Shorten trace logs.
---
 test/shell/integrity-misc.sh | 8 +++++---
 test/shell/integrity.sh      | 9 +++++----
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/test/shell/integrity-misc.sh b/test/shell/integrity-misc.sh
index e025c93d2..4ebf42213 100644
--- a/test/shell/integrity-misc.sh
+++ b/test/shell/integrity-misc.sh
@@ -22,9 +22,11 @@ mkdir -p $mnt
 
 aux prepare_devs 5 64
 
-printf "%0.sA" {1..16384} >> fileA
-printf "%0.sB" {1..16384} >> fileB
-printf "%0.sC" {1..16384} >> fileC
+# Use awk instead of anoyingly long log out from printf
+#printf "%0.sA" {1..16384} >> fileA
+awk 'BEGIN { while (z++ < 16384) printf "A" }' > fileA
+awk 'BEGIN { while (z++ < 16384) printf "B" }' > fileB
+awk 'BEGIN { while (z++ < 16384) printf "C" }' > fileC
 
 # generate random data
 dd if=/dev/urandom of=randA bs=512K count=2
diff --git a/test/shell/integrity.sh b/test/shell/integrity.sh
index f2acc1ee4..6af12f23f 100644
--- a/test/shell/integrity.sh
+++ b/test/shell/integrity.sh
@@ -23,10 +23,11 @@ mkdir -p $mnt
 
 aux prepare_devs 5 64
 
-printf "%0.sA" {1..16384} >> fileA
-# instead of long debug 'printf' log use 'sed' and just replace A->B|C
-sed -e 's,A,B,g' fileA > fileB
-sed -e 's,A,C,g' fileA > fileC
+# Use awk instead of anoyingly long log out from printf
+#printf "%0.sA" {1..16384} >> fileA
+awk 'BEGIN { while (z++ < 16384) printf "A" }' > fileA
+awk 'BEGIN { while (z++ < 16384) printf "B" }' > fileB
+awk 'BEGIN { while (z++ < 16384) printf "C" }' > fileC
 
 # generate random data
 dd if=/dev/urandom of=randA bs=512K count=2



                 reply	other threads:[~2020-09-18 15:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200918153115.B919E396EC88@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.