linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] ltp/fsx: allow comments when reading operations from logs
@ 2017-11-09  8:32 Eryu Guan
  2017-11-09  8:32 ` [PATCH v2 2/2] generic: test zero page cache beyond new EOF on truncate down Eryu Guan
  2017-11-09  8:40 ` [PATCH v2 1/2] ltp/fsx: allow comments when reading operations from logs Amir Goldstein
  0 siblings, 2 replies; 5+ messages in thread
From: Eryu Guan @ 2017-11-09  8:32 UTC (permalink / raw)
  To: fstests; +Cc: linux-xfs, Eryu Guan

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>
---
v2:
- no change since v1

 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


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

end of thread, other threads:[~2017-11-17  7:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-09  8:32 [PATCH v2 1/2] ltp/fsx: allow comments when reading operations from logs Eryu Guan
2017-11-09  8:32 ` [PATCH v2 2/2] generic: test zero page cache beyond new EOF on truncate down Eryu Guan
2017-11-17  6:58   ` Eryu Guan
2017-11-17  7:10     ` Darrick J. Wong
2017-11-09  8:40 ` [PATCH v2 1/2] ltp/fsx: allow comments when reading operations from logs Amir Goldstein

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).