public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: fstests@vger.kernel.org
Cc: linux-xfs@vger.kernel.org, Eryu Guan <eguan@redhat.com>
Subject: [PATCH 1/2] ltp/fsx: allow comments when reading operations from logs
Date: Fri, 27 Oct 2017 20:53:56 +0800	[thread overview]
Message-ID: <20171027125357.25222-1-eguan@redhat.com> (raw)

We use '--replay-ops' option to replay operations in the specified
operation log file, but we're not allowed to add comments for the
operations in the log, which might be useful when writing regression
tests that replay a given sequence of operations.

Now treat lines starting with '#' as comments and skip them when
reading operations.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 ltp/fsx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ltp/fsx.c b/ltp/fsx.c
index 863d536e5a7b..9c358f27bd92 100644
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -1391,7 +1391,7 @@ read_op(struct log_entry *log_entry)
 				goto fail;
 			}
 			str = strtok(line, " \t\n");
-		} while (!str);
+		} while (!str || str[0] == '#');
 
 		if (strcmp(str, "skip") == 0) {
 			log_entry->flags |= FL_SKIPPED;
-- 
2.13.6


             reply	other threads:[~2017-10-27 12:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27 12:53 Eryu Guan [this message]
2017-10-27 12:53 ` [PATCH 2/2] generic: ensure that mmap read doesn't see non-zero past EOF Eryu Guan

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=20171027125357.25222-1-eguan@redhat.com \
    --to=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox