From patchwork Tue Jan 24 10:35:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 9534835 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C09260434 for ; Tue, 24 Jan 2017 10:35:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DB3026AE3 for ; Tue, 24 Jan 2017 10:35:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 50FE326C2F; Tue, 24 Jan 2017 10:35:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7A3526B41 for ; Tue, 24 Jan 2017 10:35:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750747AbdAXKfb (ORCPT ); Tue, 24 Jan 2017 05:35:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36430 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750713AbdAXKfa (ORCPT ); Tue, 24 Jan 2017 05:35:30 -0500 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3EC513D95E for ; Tue, 24 Jan 2017 10:35:31 +0000 (UTC) Received: from localhost (dhcp-12-137.nay.redhat.com [10.66.12.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB45416A7D; Tue, 24 Jan 2017 10:35:30 +0000 (UTC) From: Eryu Guan To: fstests@vger.kernel.org Cc: Eryu Guan Subject: [PATCH] tools/nextid: pad 0 in next test id seq number Date: Tue, 24 Jan 2017 18:35:26 +0800 Message-Id: <20170124103526.8639-1-eguan@redhat.com> X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 24 Jan 2017 10:35:31 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Christoph Hellwig --- 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]: