xfs
[Top] [All Lists]

[PATCH] xfstest: log operations properly to generic/001.full

To: xfs@xxxxxxxxxxx
Subject: [PATCH] xfstest: log operations properly to generic/001.full
From: Ming Chen <v.mingchen@xxxxxxxxx>
Date: Sat, 5 Apr 2014 01:52:43 -0400
Cc: Erez Zadok <ezk@xxxxxxxxxxxxxxxxx>, david@xxxxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=AoQaZ9hPqNrUA43l5bpHXVnZYUfvDFOmDu/vCmv0TPU=; b=s2lOgS7xG/42HG72Wunp8m9esOVPiDjVXILkWdKuE1sNSEPkQguqavL73pyCFg15eP 8EiPNzXMWdjck106lECSAgamf6aSJZV/tyXMmVOo6rX4i3E5DV9tACA/oI9xDQcCoo/+ g/8IK0KfvsPCH4jRUY3Y/JWnBVpv7xr9I8KfCD8ScNbofSebR8w4mddLYAHA5trRimCk WbsGU3ZpY/1w6bNEGFaLzwf0t2g6S67dpk9gmzsY0lvQEudSkMUYyyyxEfg5oINQTXAO byKh5VcEpK7NdOHpzTj+oK+X7Gjnh07gcdxSfNW4QWJSyUgt4dPMRTZWxTYKewoFd071 p9qA==
Part of the operations were written to 001.full from the awk script, while the
rest were piped to 001.full using tee.  The resultant 001.full did not reflect
what are really performed.  This makes debugging difficult.

Signed-off-by: Ming Chen <v.mingchen@xxxxxxxxx>
---
 tests/generic/001 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/generic/001 b/tests/generic/001
index 6e5f3dd..e1142ed 100755
--- a/tests/generic/001
+++ b/tests/generic/001
@@ -190,7 +190,7 @@ _mark_iteration()
 #
 _chain()
 {
-    $AWK_PROG -v full_file=$seqres.full -v verify=$verify <$tmp.config '
+    $AWK_PROG -v verify=$verify <$tmp.config '
 BEGIN  { nfile = 0 }
 /^\#/  { next }
        { file[nfile] = $1
@@ -210,7 +210,7 @@ END { srand('$iter')
                printf "if [ ! -f %s ]; then echo \"%s missing!\";
exit; fi\n",file[j],file[j]
                printf "if [ -f %s.0 ]; then echo \"%s.0 already
present!\"; exit; fi\n",file[j],file[j]
                printf "cp %s %s.0 || exit 1\n",file[j],file[j]
-               printf "ls -i %s.0\n", file[j] >full_file;
+               printf "ls -i %s.0\n", file[j];
                total_size += size[j]
                printf "# total size = %d\n", total_size
            }
@@ -219,7 +219,7 @@ END { srand('$iter')
                printf "if [ ! -f %s.%d ]; then echo \"%s.%d
missing!\"; exit; fi\n",file[j],link[j]-1,file[j],link[j]-1
                printf "if [ -f %s.%d ]; then echo \"%s.%d already
present!\"; exit; fi\n",file[j],link[j],file[j],link[j]
                printf "cp %s.%d %s.%d || exit
1\n",file[j],link[j]-1,file[j],link[j]
-               printf "ls -i %s.%d\n", file[j], link[j] >full_file;
+               printf "ls -i %s.%d\n", file[j], link[j];
                total_size += size[j]
                printf "# total size = %d\n", total_size
            }
@@ -231,7 +231,7 @@ END { srand('$iter')
          for (j=0; j<nfile; j++) {
            if (link[j] > 0) {
                printf "mv %s.%d %s.last\n",file[j],link[j]-1,file[j]
-               printf "ls -i %s.last\n", file[j] >full_file;
+               printf "ls -i %s.last\n", file[j];
            }
            for (i=0; i<link[j]-1; i++) {
                printf "rm -f %s.%d\n",file[j],i
-- 
1.8.4.2

<Prev in Thread] Current Thread [Next in Thread>