public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/nextid: pad 0 in next test id seq number
@ 2017-01-24 10:35 Eryu Guan
  2017-01-24 17:11 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Eryu Guan @ 2017-01-24 10:35 UTC (permalink / raw)
  To: fstests; +Cc: Eryu Guan

nextid returns the next available seq number, but it doesn't pad id
number with 0, e.g.

./tools/nextid ext4
23

After the fix it returns:

./tools/nextid ext4
023

This eases the process of moving tests around in a script.

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

diff --git a/tools/sort-group b/tools/sort-group
index 84944ed..6fcaad7 100755
--- a/tools/sort-group
+++ b/tools/sort-group
@@ -103,7 +103,7 @@ def nextid_main():
 		xid = startid
 		while xid in xkeys:
 			xid += 1
-		print('%s/%d' % (group, xid))
+		print('%s/%03d' % (group, xid))
 
 if __name__ == '__main__':
 	if 'nextid' in sys.argv[0]:
-- 
2.9.3


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

* Re: [PATCH] tools/nextid: pad 0 in next test id seq number
  2017-01-24 10:35 [PATCH] tools/nextid: pad 0 in next test id seq number Eryu Guan
@ 2017-01-24 17:11 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2017-01-24 17:11 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-24 10:35 [PATCH] tools/nextid: pad 0 in next test id seq number Eryu Guan
2017-01-24 17:11 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox