From: Eryu Guan Date: Tue, 24 Jan 2017 10:30:04 +0000 (+0800) Subject: tools/nextid: pad 0 in next test id seq number X-Git-Tag: v2022.05.01~2199 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=aec50848c3d28b63d9772d38e7c8b16dd0e1733c tools/nextid: pad 0 in next test id seq number 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. Reviewed-by: Christoph Hellwig Signed-off-by: Eryu Guan --- diff --git a/tools/sort-group b/tools/sort-group index 84944ed6..6fcaad77 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]: