From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id B4C83A0096 for ; Tue, 9 Apr 2019 18:13:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7308F4F90; Tue, 9 Apr 2019 18:13:01 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70045.outbound.protection.outlook.com [40.107.7.45]) by dpdk.org (Postfix) with ESMTP id 11A7B4D27 for ; Tue, 9 Apr 2019 18:12:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aOfMj2DQJ5NnKZH5B25AA+bCi6mg2H2TjdtcmmVZlxU=; b=g+cXkSXH3GSH19+kw9yocXJnAF70ac6ihd2hW0DW/HQpFjtRJhRoQOtLKe3exyktIQVKwE7V9VGG6pfd/+e8MFr39kxQvjFPE6DwVqMRdq/Iu8/bWMKkGRXLU2aWU7f9CVITorAa2arhyTpsnMB9+Cf0+UicM6pNuGQhln6R+eY= Received: from AM6PR05MB4405.eurprd05.prod.outlook.com (52.135.163.23) by AM6PR05MB5015.eurprd05.prod.outlook.com (20.177.36.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.18; Tue, 9 Apr 2019 16:12:57 +0000 Received: from AM6PR05MB4405.eurprd05.prod.outlook.com ([fe80::edb9:6ee3:cd08:b3f2]) by AM6PR05MB4405.eurprd05.prod.outlook.com ([fe80::edb9:6ee3:cd08:b3f2%6]) with mapi id 15.20.1771.016; Tue, 9 Apr 2019 16:12:57 +0000 From: Ali Alnubani To: "ci@dpdk.org" CC: Thomas Monjalon , "ferruh.yigit@intel.com" , "jplsek@iol.unh.edu" , Ori Kam Thread-Topic: [PATCH v4] add script to decide best tree match for patches Thread-Index: AQHU7u8Yj2IozsiXG0SUmF+7sz8O2g== Date: Tue, 9 Apr 2019 16:12:57 +0000 Message-ID: <20190409161237.28405-1-alialnu@mellanox.com> References: <20190216160206.11957-1-alialnu@mellanox.com> In-Reply-To: <20190216160206.11957-1-alialnu@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.11.0 x-clientproxiedby: PR0P264CA0001.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100::13) To AM6PR05MB4405.eurprd05.prod.outlook.com (2603:10a6:209:44::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=alialnu@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2001:4b98:dc0:51:216:3eff:feac:53b] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f485e1e3-152e-4a51-5e05-08d6bd063aaa x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:AM6PR05MB5015; x-ms-traffictypediagnostic: AM6PR05MB5015: x-ms-exchange-purlcount: 1 x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 000227DA0C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(376002)(366004)(136003)(346002)(189003)(199004)(11346002)(476003)(6916009)(2351001)(486006)(2501003)(86362001)(6486002)(50226002)(8936002)(2616005)(14454004)(316002)(54906003)(446003)(1730700003)(81156014)(8676002)(81166006)(6116002)(106356001)(105586002)(36756003)(97736004)(68736007)(76176011)(52116002)(966005)(6306002)(5640700003)(6512007)(53936002)(4326008)(46003)(102836004)(107886003)(71200400001)(7736002)(305945005)(71190400001)(6506007)(386003)(256004)(25786009)(99286004)(30864003)(478600001)(2906002)(5660300002)(6436002)(1076003)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB5015; H:AM6PR05MB4405.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: BFtkl0X7Tn9LWqRIfYHXtCbvkymIpwReudllm7peXNvwT+3ud5jMzbhROhxab0IhWoRac4YRqleEDBSDtgU7az2/KBfZnQzrvjLO8+JCux/SJvODf68mRMAwYG4QkrHjVV8sOBWyJpotwvvGMNqMikHzCwTSROc17a/VPGT4xTybQBLjODp7ubFH2EXIO46k6y+CL4I2sMKL/eVhasjlM+TlzOspIy6AiTrALRsmihfOEUVIAKYPs/bFxaz73jPEdUpYv82imS4Wu5aKHcnjFU4DHEcN9h5RtiFCMVpTkT2VVmVWtQoBjnt5phnPIBwZjxeMyMXKo95wd0UmLmK3RPlETV88qw6z9k90WKDhaEELYhmV0+Wz2zA6BHjGRV9E5w+NvJ23UzhTolkfYvX9JgUlSgkV2sxgotbqrNCz0d8= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: f485e1e3-152e-4a51-5e05-08d6bd063aaa X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2019 16:12:57.4243 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB5015 Subject: [dpdk-ci] [PATCH v4] add script to decide best tree match for patches X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: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mb3Iga2V5IGluIGNvbmZfa2V5czoNCisgICAgICAgICAgICB2YWx1ZSA9IGNvbmZf b2JqLmdldCgncHdfe30nLmZvcm1hdChrZXkpKQ0KKyAgICAgICAgICAgIGlmIG5vdCB2YWx1ZToN CisgICAgICAgICAgICAgICAgcHJpbnQoJy0tcHdfe30gaXMgYSByZXF1aXJlZCBnaXQtcHcgY29u ZmlndXJhdGlvbicuZm9ybWF0KGtleSkpDQorICAgICAgICAgICAgICAgIHN5cy5leGl0KDEpDQor ICAgICAgICAgICAgZWxzZToNCisgICAgICAgICAgICAgICAgc2V0YXR0cihzZWxmLkNPTkYsIGtl eSwgdmFsdWUpDQorDQorICAgIGRlZiBhcGlfZ2V0KHNlbGYsIHJlc291cmNlX3R5cGUsIHJlc291 cmNlX2lkKToNCisgICAgICAgICIiIlJldHJpZXZlIGFuIEFQSSByZXNvdXJjZS4iIiINCisgICAg ICAgIHRyeToNCisgICAgICAgICAgICByZXR1cm4gYXBpLmRldGFpbChyZXNvdXJjZV90eXBlLCBy ZXNvdXJjZV9pZCkNCisgICAgICAgIGV4Y2VwdCBIVFRQRXJyb3IgYXMgZXJyOg0KKyAgICAgICAg ICAgIGlmICc0MDQnIGluIHN0cihlcnIpOg0KKyAgICAgICAgICAgICAgICBzeXMuZXhpdCgxKQ0K KyAgICAgICAgICAgIGVsc2U6DQorICAgICAgICAgICAgICAgIHJhaXNlDQorDQorDQorY2xhc3Mg RGlmZihvYmplY3QpOg0KKw0KKyAgICBAc3RhdGljbWV0aG9kDQorICAgIGRlZiBmaW5kX2ZpbGVu YW1lcyhkaWZmKToNCisgICAgICAgICIiIkZpbmQgZmlsZSBjaGFuZ2VzIGluIGEgZ2l2ZW4gZGlm Zi4NCisNCisgICAgICAgIFNvdXJjZTogaHR0cHM6Ly9naXRodWIuY29tL2dldHBhdGNod29yay9w YXRjaHdvcmsvYmxvYi9tYXN0ZXIvcGF0Y2h3b3JrL3BhcnNlci5weQ0KKyAgICAgICAgQ2hhbmdl cyBmcm9tIHNvdXJjZToNCisgICAgICAgICAgICAtIE1vdmVkIF9maWxlbmFtZV9yZSBpbnRvIHRo ZSBtZXRob2QuDQorICAgICAgICAgICAgLSBSZWR1Y2VkIG5ld2xpbmVzLg0KKyAgICAgICAgIiIi DQorICAgICAgICBfZmlsZW5hbWVfcmUgPSByZS5jb21waWxlKHInXigtLS18XCtcK1wrKSAoXFMr KScpDQorICAgICAgICAjIG5vcm1hbGlzZSBzcGFjZXMNCisgICAgICAgIGRpZmYgPSBkaWZmLnJl cGxhY2UoJ1xyJywgJycpDQorICAgICAgICBkaWZmID0gZGlmZi5zdHJpcCgpICsgJ1xuJw0KKyAg ICAgICAgZmlsZW5hbWVzID0ge30NCisgICAgICAgIGZvciBsaW5lIGluIGRpZmYuc3BsaXQoJ1xu Jyk6DQorICAgICAgICAgICAgaWYgbGVuKGxpbmUpIDw9IDA6DQorICAgICAgICAgICAgICAgIGNv bnRpbnVlDQorICAgICAgICAgICAgZmlsZW5hbWVfbWF0Y2ggPSBfZmlsZW5hbWVfcmUubWF0Y2go bGluZSkNCisgICAgICAgICAgICBpZiBub3QgZmlsZW5hbWVfbWF0Y2g6DQorICAgICAgICAgICAg ICAgIGNvbnRpbnVlDQorICAgICAgICAgICAgZmlsZW5hbWUgPSBmaWxlbmFtZV9tYXRjaC5ncm91 cCgyKQ0KKyAgICAgICAgICAgIGlmIGZpbGVuYW1lLnN0YXJ0c3dpdGgoJy9kZXYvbnVsbCcpOg0K KyAgICAgICAgICAgICAgICBjb250aW51ZQ0KKyAgICAgICAgICAgIGZpbGVuYW1lID0gJy8nLmpv aW4oZmlsZW5hbWUuc3BsaXQoJy8nKVsxOl0pDQorICAgICAgICAgICAgZmlsZW5hbWVzW2ZpbGVu YW1lXSA9IFRydWUNCisgICAgICAgIGZpbGVuYW1lcyA9IHNvcnRlZChmaWxlbmFtZXMua2V5cygp KQ0KKyAgICAgICAgcmV0dXJuIGZpbGVuYW1lcw0KKw0KKw0KK2NsYXNzIE1haW50YWluZXJzKG9i amVjdCk6DQorDQorICAgIGZpbGVfcmVnZXggPSByJ0Y6XHMoLiopJw0KKyAgICB0cmVlX3JlZ2V4 ID0gcidUOiBnaXQ6XC9cL2RwZGtcLm9yZyg/OlwvbmV4dCkqXC8oLiopJw0KKyAgICBzZWN0aW9u X3JlZ2V4ID0gcicoW15cbl0qKVxuLSsuKj8oPz0oW15cbl0qXG4tKyl8XFopJw0KKyAgICBzdWJz ZWN0aW9uX3JlZ2V4ID0gcidbXlxuXSg/Oig/IVxue3syfX0pLikqP15GOiB7fSg/Oig/IVxue3sy fX0pLikqJw0KKw0KKyAgICBkZWYgX19pbml0X18oc2VsZik6DQorICAgICAgICB3aXRoIG9wZW4o TUFJTlRBSU5FUlNfRklMRV9QQVRIKSBhcyBmZDoNCisgICAgICAgICAgICBzZWxmLm1haW50YWlu ZXJzX3R4dCA9IGZkLnJlYWQoKQ0KKyAgICAgICAgIyBBZGQgd2lsZGNhcmQgc3ltYm9sIGF0IHRo ZSBlbmQgb2YgbGluZXMgd2hlcmUgbWlzc2luZy4NCisgICAgICAgIHNlbGYubWFpbnRhaW5lcnNf dHh0ID0gcmUuc3ViKA0KKyAgICAgICAgICAgICAgICByJy8kJywgJy8qJywgc2VsZi5tYWludGFp bmVyc190eHQsDQorICAgICAgICAgICAgICAgIGNvdW50PTAsIGZsYWdzPXJlLk1VTFRJTElORSkN CisgICAgICAgICMgVGhpcyBtYXRjaGVzIHRoZSB3aG9sZSBzZWN0aW9uIHRoYXQgc3RhcnRzIHdp dGg6DQorICAgICAgICAjIFNlY3Rpb24gTmFtZQ0KKyAgICAgICAgIyAtLS0tLS0tLS0tLS0NCisg ICAgICAgIHNlbGYuc2VjdGlvbnMgPSBsaXN0KHJlLmZpbmRpdGVyKA0KKyAgICAgICAgICAgICAg ICBzZWxmLnNlY3Rpb25fcmVnZXgsDQorICAgICAgICAgICAgICAgIHNlbGYubWFpbnRhaW5lcnNf dHh0LA0KKyAgICAgICAgICAgICAgICBy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VGhlIHNlYXJjaCBzdG9wcyBhdCB0aGUgZmlyc3QgbWF0Y2guDQorICAgICAgICAiIiINCisgICAg ICAgIHRyZWUgPSBOb25lDQorICAgICAgICAjIENoZWNrIGlmIHdlIGFscmVhZHkgdHJpZWQgdG8g bWF0Y2ggd2l0aCB0aGlzIHBhdHRlcm4uDQorICAgICAgICBmb3IgcGF0IGluIHNlbGYubWF0Y2hl ZC5rZXlzKCk6DQorICAgICAgICAgICAgaWYgZm5tYXRjaC5mbm1hdGNoKGZpbGVuYW1lLCBwYXQp Og0KKyAgICAgICAgICAgICAgICByZXR1cm4gc2VsZi5tYXRjaGVkW3BhdF0NCisNCisgICAgICAg ICMgRmluZCBhIGZpbGUgbWF0Y2hpbmcgcGF0dGVybi4NCisgICAgICAgIG1hdGNoaW5nX3BhdHRl cm4gPSBOb25lDQorICAgICAgICBmb3IgcGF0IGluIHNlbGYuZmlsZV9wYXR0ZXJuczoNCisgICAg ICAgICAgICAjIFRoaXMgcmVnZXggbWF0Y2hlcyBhIGxvdCBvZiBmaWxlcyBhbmQgdHJlZXMuIEln bm9yZSBpdC4NCisgICAgICAgICAgICBpZiAnZG9jLyonIGluIHBhdDoNCisgICAgICAgICAgICAg ICAgY29udGludWUNCisgICAgICAgICAgICBpZiBmbm1hdGNoLmZubWF0Y2goZmlsZW5hbWUsIHBh dCk6DQorICAgICAgICAgICAgICAgIG1hdGNoaW5nX3BhdHRlcm4gPSBwYXQNCisgICAgICAgICAg ICAgICAgYnJlYWsNCisgICAgICAgIGlmIG5vdCBtYXRjaGluZ19wYXR0ZXJuOg0KKyAgICAgICAg ICAgIHJldHVybiBOb25lDQorDQorICAgICAgICBmb3VuZF9tYXRjaCA9IEZhbHNlDQorICAgICAg ICAjIEZpbmQgdGhlIGJsb2NrIGNvbnRhaW5pbmcgZmlsZW5hbWUuDQorICAgICAgICByZWdleCA9 IHNlbGYuc3Vic2VjdGlvbl9yZWdleC5mb3JtYXQocmUuZXNjYXBlKG1hdGNoaW5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24uZ3JvdXAoMCkpOg0KKyAgICAgICAgICAgICAgICAgICAg dHJlZV9tYXRjaCA9IHJlLnNlYXJjaCgNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2Vs Zi50cmVlX3JlZ2V4LA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWN0aW9uLmdyb3Vw KDApLnNwbGl0KCdcblxuJylbMF0pDQorICAgICAgICAgICAgICAgICAgICBpZiB0cmVlX21hdGNo Og0KKyAgICAgICAgICAgICAgICAgICAgICAgIHRyZWUgPSB0cmVlX21hdGNoLmdyb3VwKDEpDQor DQorICAgICAgICBzZWxmLm1hdGNoZWRbbWF0Y2hpbmdfcGF0dGVybl0gPSB0cmVlDQorICAgICAg ICByZXR1cm4gdHJlZQ0KKw0KKyAgICBkZWYgZ2V0X2NvbW1vbl9kZW5vbWluYXRvcihzZWxmLCB0 cmVlX2xpc3QpOg0KKyAgICAgICAgIiIiRmluZHMgYSBjb21tb24gdHJlZSBieSBmaW5kaW5nIHRo ZSBsb25nZXN0IGNvbW1vbiBwcmVmaXguDQorICAgICAgICBFeGFtcGxlcyBmb3IgZXhwZWN0ZWQg b3V0cHV0Og0KKyAgICAgICAgICBkcGRrLW5leHQtdmlydGlvICsgZHBkayA9IGRwZGsNCisgICAg ICAgICAgZHBkay1uZXh0LW5ldC1pbnRlbCArIGRwZGsgPSBkcGRrDQorICAgICAgICAgIGRwZGst bmV4dC1jcnlwdG8gKyBkcGRrLW5leHQtdmlydGlvID0gZHBkaw0KKyAgICAgICAgICBkcGRrLW5l eHQtbmV0LWludGVsICsgZHBkay1uZXh0LW5ldC1tbHggPSBkcGRrLW5leHQtbmV0DQorICAgICAg ICAiIiINCisgICAgICAgICMgTWFrZSBzdXJlIHRoZSBsaXN0IGlzIHVuaXF1ZS4NCisgICAgICAg IHRyZWVfbGlzdCA9IGxpc3Qoc2V0KHRyZWVfbGlzdCkpDQorDQorICAgICAgICAjIFJlbmFtZSBk cGRrLW5leHQtdmlydGl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ljZXM9KA0K KyAgICAgICAgICAgICAgICAnbGlzdF90cmVlc19mb3JfcGF0Y2gnLA0KKyAgICAgICAgICAgICAg ICAnbGlzdF90cmVlc19mb3Jfc2VyaWVzJyksDQorICAgICAgICAgICAgcmVxdWlyZWQ9VHJ1ZSwg aGVscD0nQ29tbWFuZCB0byBwZXJmb3JtJykNCisNCisgICAgZ2l0X3B3X2NvbmZfcGFyc2VyLmFk ZF9hcmd1bWVudCgNCisgICAgICAgICAgICAnLS1wd19zZXJ2ZXInLCB0eXBlPXN0ciwNCisgICAg ICAgICAgICBkZWZhdWx0PW9zLmVudmlyb24uZ2V0KA0KKyAgICAgICAgICAgICAgICAnUFdfU0VS VkVSJywgdXRpbHMuZ2l0X2NvbmZpZygncHcuc2VydmVyJykpLA0KKyAgICAgICAgICAgIGhlbHA9 J1BhdGNod29yayBzZXJ2ZXInKQ0KKyAgICBnaXRfcHdfY29uZl9wYXJzZXIuYWRkX2FyZ3VtZW50 KA0KKyAgICAgICAgICAgICctLXB3X3Byb2plY3QnLCB0eXBlPXN0ciwNCisgICAgICAgICAgICBk ZWZhdWx0PW9zLmVudmlyb24uZ2V0KA0KKyAgICAgICAgICAgICAgICAnUFdfUFJPSkVDVCcsIHV0 aWxzLmdpdF9jb25maWcoJ3B3LnByb2plY3QnKSksDQorICAgICAgICAgICAgaGVscD0nUGF0Y2h3 b3JrIHByb2plY3QnKQ0KKyAgICBnaXRfcHdfY29uZl9wYXJzZXIuYWRkX2FyZ3VtZW50KA0KKyAg ICAgICAgICAgICctLXB3X3Rva2VuJywgdHlwZT1zdHIsDQorICAgICAgICAgICAgZGVmYXVsdD1v cy5lbnZpcm9uLmdldCgnUFdfVE9LRU4nLCB1dGlscy5naXRfY29uZmlnKCdwdy50b2tlbicpKSwN CisgICAgICAgICAgICBoZWxwPSdBdXRoZW50aWNhdGlvbiB0b2tlbicpDQorDQorICAgIHBhcnNl ci5hZGRfYXJndW1lbnQoDQorICAgICAgICAgICAgJ2lkJywgdHl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