diff mbox

tools/nextid: pad 0 in next test id seq number

Message ID 20170124103526.8639-1-eguan@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eryu Guan Jan. 24, 2017, 10:35 a.m. UTC
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(-)

Comments

Christoph Hellwig Jan. 24, 2017, 5:11 p.m. UTC | #1
Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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]: