From: Eryu Guan <eguan@redhat.com>
To: fstests@vger.kernel.org
Cc: Eryu Guan <eguan@redhat.com>
Subject: [PATCH] tools/nextid: pad 0 in next test id seq number
Date: Tue, 24 Jan 2017 18:35:26 +0800 [thread overview]
Message-ID: <20170124103526.8639-1-eguan@redhat.com> (raw)
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
next reply other threads:[~2017-01-24 10:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-24 10:35 Eryu Guan [this message]
2017-01-24 17:11 ` [PATCH] tools/nextid: pad 0 in next test id seq number Christoph Hellwig
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=20170124103526.8639-1-eguan@redhat.com \
--to=eguan@redhat.com \
--cc=fstests@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