From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 404C99A9E for ; Mon, 18 May 2015 09:46:59 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 18 May 2015 00:46:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,451,1427785200"; d="scan'208";a="730995243" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by orsmga002.jf.intel.com with ESMTP; 18 May 2015 00:46:56 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by PGSMSX108.gar.corp.intel.com (10.221.44.103) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 18 May 2015 15:46:42 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.120]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.94]) with mapi id 14.03.0224.002; Mon, 18 May 2015 15:46:40 +0800 From: "Xu, HuilongX" To: "Jiajia, SunX" , "dts@dpdk.org" Thread-Topic: =?utf-8?B?W2R0c10gW+KAmGR0cy12MeKAmSAxLzldIEFic3RyYWN0IHRoZSBOSUMgZGV2?= =?utf-8?Q?ice_as_the_single_class_NetDevice?= Thread-Index: AQHQkSicj7lTUqWUjUaD3b5kH9Ujw52BP4UA Date: Mon, 18 May 2015 07:46:40 +0000 Message-ID: References: <1431925646-1314-1-git-send-email-sunx.jiajia@intel.com> <1431925646-1314-2-git-send-email-sunx.jiajia@intel.com> In-Reply-To: <1431925646-1314-2-git-send-email-sunx.jiajia@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-hashedpuzzle: BTGO BuLI CrnF EyDX Flkk GuYg GvMm HOBn HWtz IC1B IGBK IP6d IlRg Iuaz JCS8 JKoA; 1; ZAB0AHMAQABkAHAAZABrAC4AbwByAGcA; Sosha1_v1; 7; {AC8B0EA7-920C-4BA0-9425-639DC56AB740}; aAB1AGkAbABvAG4AZwB4AC4AeAB1AEAAaQBuAHQAZQBsAC4AYwBvAG0A; Mon, 18 May 2015 07:46:38 GMT; UgBFADoAIABbAGQAdABzAF0AIABbABggZAB0AHMALQB2ADEAGSAgADEALwA5AF0AIABBAGIAcwB0AHIAYQBjAHQAIAB0AGgAZQAgAE4ASQBDACAAZABlAHYAaQBjAGUAIABhAHMAIAB0AGgAZQAgAHMAaQBuAGcAbABlACAAYwBsAGEAcwBzACAATgBlAHQARABlAHYAaQBjAGUA x-cr-puzzleid: {AC8B0EA7-920C-4BA0-9425-639DC56AB740} x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dts] =?utf-8?b?W+KAmGR0cy12MeKAmSAxLzldIEFic3RyYWN0IHRoZSBOSUMg?= =?utf-8?q?device_as_the_single_class_NetDevice?= X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2015 07:47:01 -0000 SGkgSmlhamlhLA0KSSBoYXZlIHR3byBjb21tZW50cyBpbiB0aGlzIHBhdGNoLA0KV291bGQgeW91 IGNoZWNrIHRoZSBjb21tZW50cyBpbiBmdW5jdGlvbiAiZGVmIGRlc3Ryb3lfc3Jpb3ZfdmZzX2J5 X3BvcnQoc2VsZiwgcG9ydF9pZCk6IiBhbmQgImRlZiBzZXRfdG9vbGNoYWluKHNlbGYsIHRhcmdl dCk6Ig0KVGhhbmtzICBhIGxvdA0KDQotLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KRnJvbTog ZHRzIFttYWlsdG86ZHRzLWJvdW5jZXNAZHBkay5vcmddIE9uIEJlaGFsZiBPZiBzamlhamlheA0K U2VudDogTW9uZGF5LCBNYXkgMTgsIDIwMTUgMTowNyBQTQ0K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KKyAgICAgICAgR2V0IHRoZSBkcml2ZXIgb2Ygc3BlY2lmaWVkIHBj aSBkZXZpY2Ugb24gbGludXguDQogICAgICAgICAiIiINCi0gICAgICAgIG91dCA9IHNlbGYuc2Vu ZF9leHBlY3QoInBjaWNvbmYgLWwiLCAiIyAiKQ0KLSAgICAgICAgcmV4cCA9IHIiKFx3KilAcGNp MDolcyIgJSBidXNfaWQNCisgICAgICAgIG91dCA9IHNlbGYuc2VuZF9leHBlY3QoImNhdCAvc3lz L2J1cy9wY2kvZGV2aWNlcy8wMDAwXDolc1w6JXMvdWV2ZW50IiAlDQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChidXNfaWQsIGRldmZ1bl9pZCksICIjICIsIGFsdF9zZXNzaW9uPVRy dWUpDQorICAgICAgICByZXhwID0gciJEUklWRVI9KC4rPylcciINCiAgICAgICAgIHBhdHRlcm4g PSByZS5jb21waWxlKHJleHApDQotICAgICAgICBtYXRjaCA9IHBhdHRlcm4uZmluZGFsbChvdXQp DQotICAgICAgICByZXR1cm4gbWF0Y2hbMF0NCisgICAgICAgIG1hdGNoID0gcGF0dGVybi5zZWFy Y2gob3V0KQ0KKyAgICAgICAgaWYgbm90IG1hdGNoOg0KKyAgICAgICAgICAgIHJldHVybiBOb25l DQorICAgICAgICByZXR1cm4gbWF0Y2guZ3JvdXAoMSkNCiANCi0gICAgZGVmIGdldF9tYWNfYWRk cihzZWxmLCBpbnRmLCBidXNfaWQ9JycsIGRldmZ1bl9pZD0nJyk6DQorICAgIGRlZiBnZXRfcGNp X2Rldl9kcml2ZXJfZnJlZWJzZChzZWxmLCBidXNfaWQsIGRldmZ1bl9pZCk6DQogICAgICAgICAi IiINCi0gICAgICAgIEdldCBtYWMgYWRkcmVzcyBvZiBzcGVjaWZpZWQgcGNpIGRldmljZS4NCisg ICAgICAgIEdldCB0aGUgZHJpdmVyIG9mIHNwZWNpZmllZCBwY2kgZGV2aWNlLg0KICAgICAgICAg IiIiDQotICAgICAgICBn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bGYsIGJ1c19pZCwgZGV2ZnVuX2lk KToNCiAgICAgICAgICIiIg0KLSAgICAgICAgR2V0IG1hYyBhZGRyZXNzIG9mIHNwZWNpZmllZCBw Y2kgZGV2aWNlIG9uIEZyZWVic2QuDQorICAgICAgICBHZXQgdGhlIHBjaSBpZCBvZiBzcGVjaWZp ZWQgcGNpIGRldmljZSBvbiBsaW51eC4NCiAgICAgICAgICIiIg0KLSAgICAgICAgb3V0ID0gc2Vs Zi5zZW5kX2V4cGVjdCgnaWZjb25maWcgJXMnICUgaW50ZiwgJyMgJykNCi0gICAgICAgIHJleHAg PSByImV0aGVyIChbXGRhLWY6XSopIg0KKyAgICAgICAgb3V0ID0gc2VsZi5zZW5kX2V4cGVjdCgi Y2F0IC9zeXMvYnVzL3BjaS9kZXZpY2VzLzAwMDBcOiVzXDolcy91ZXZlbnQiICUNCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKGJ1c19pZCwgZGV2ZnVuX2lkKSwgIiMgIiwgYWx0X3Nl c3Npb249VHJ1ZSkNCisgICAgICAgIHJleHAgPSByIlBDSV9JRD0oLispIg0KICAgICAgICAgcGF0 dGVybiA9IHJlLmNvbXBpbGUocmV4cCkNCi0gICAgICAgIG1hdGNoID0gcGF0dGVybi5maW5kYWxs KG91dCkNCi0gICAgICAgIHJldHVybiBtYXRjaFswXQ0KKyAgICAgICAgbWF0Y2ggPSByZS5zZWFy Y2gob3V0KQ0KKyAgICAgICAgaWYgbm90IG1hdGNoOg0KKyAgICAgICAgICAgIHJldHVybiBOb25l DQorICAgICAgICByZXR1cm4gbWF0Y2guZ3JvdXAoMSkNCiANCiAgICAgZGVmIGdldF9kZXZpY2Vf bnVtYShzZWxmLCBidXNfaWQsIGRldmZ1bl9pZCk6DQogICAgICAgICAiIiINCi0gICAgICAgIEdl dCBudW1hIGlkIG9mIHNwZWNpZmllZCBwY2kgZGV2aWNlDQorICAgICAgICBHZXQgbnVtYSBudW1i ZXIgb2Ygc3BlY2lmaWVkIHBjaSBkZXZpY2UuDQorICAgICAgICAiIiINCisgICAgICAgIGdldF9k ZXZpY2VfbnVtYSA9IGdldGF0dHIoDQorICAgICAgICAgICAgc2VsZiwgImdldF9kZXZpY2VfbnVt YV8lcyIgJSBzZWxmLmdldF9vc190eXBlKCkpDQorICAgICAgICByZXR1cm4gZ2V0X2RldmljZV9u dW1hKGJ1c19pZCwgZGV2ZnVuX2lkKQ0KKw0KKyAgICBkZWYgZ2V0X2RldmljZV9udW1hX2xpbnV4 KHNlbGYsIGJ1c19pZCwgZGV2ZnVuX2lkKToNCisgICAgICAgICIiIg0KKyAgICAgICAgR2V0IG51 bWEgbnVtYmVyIG9mIHNwZWNpZmllZCBwY2kgZGV2aWNlIG9uIExpbnV4Lg0KICAgICAgICAgIiIi DQotICAgICAgICBudW1hID0gc2VsZi5zZW5kX2V4cGVjdCgiY2F0IC9zeXMvYnVzL3BjaS9kZXZp Y2VzLzAwMDBcOiVzXDolcy9udW1hX25vZGUiICUNCi0gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIChidXNfaWQsIGRldmZ1bl9pZCksICIjICIpDQorICAgICAgICBudW1hID0gc2VsZi5z ZW5kX2V4cGVjdCgNCisgICAgICAgICAgICAiY2F0IC9zeXMvYnVzL3BjaS9kZXZpY2VzLzAwMDBc OiVzXDolcy9udW1hX25vZGUiICUNCisgICAgICAgICAgICAoYnVzX2lkLCBkZXZmdW5faWQpLCAi IyAiLCBhbHRfc2Vzc2lvbj1UcnVlKQ0KIA0KICAgICAgICAgdHJ5Og0KICAgICAgICAgICAgIG51 bWEgPSBpbnQobnVtYSkNCkBAIC0yNTksMTQgKzI3NiwxNCBAQCBjbGFzcyBDcmIob2JqZWN0KToN CiAgICAgICAgIEdldCBpcHY2IGFkZHJlc3Mgb2Ygc3BlY2lmaWVkIHBjaSBkZXZpY2Ugb24gbGlu dXguDQogICAgICAgICAiIiINCiAgICAgICAgIG91dCA9IHNlbGYuc2VuZF9leHBlY3QoImlwIC1m YW1pbHkgaW5ldDYgYWRkcmVzcyBzaG93IGRldiAlcyB8IGF3ayAnL2luZXQ2LyB7IHByaW50ICQy IH0nIg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAlIGludGYsICIjICIpDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICUgaW50ZiwgIiMgIiwgYWx0X3Nlc3Npb249VHJ1 ZSkNCiAgICAgICAgIHJldHVybiBvdXQuc3BsaXQoJy8nKVswXQ0KIA0KICAgICBkZWYgZ2V0X2lw djZfYWRkcl9mcmVlYnNkKHNlbGYsIGludGYpOg0KICAgICAgICAgIiIiDQogICAgICAgICBHZXQg aXB2NiBhZGRyZXNzIG9mIHNwZWNpZmllZCBwY2kgZGV2aWNlIG9uIEZyZWVic2QuDQogICAgICAg ICAiIiINCi0gICAgICAgIG91dCA9IHNlbGYuc2VuZF9leHBlY3QoJ2lmY29uZmlnICVzJyAlIGlu dGYsICcjICcpDQorICAgICAgICBvdXQgPSBzZWxmLnNlbmRfZXhwZWN0KCdpZmNvbmZpZyAlcycg JSBpbnRmLCAnIyAnLCBhbHRfc2Vzc2lvbj1UcnVlKQ0KICAgICAgICAgcmV4cCA9IHIiaW5ldDYg KFtcZGEtZjpdKiklIg0KICAgICAgICAgcGF0dGVybiA9IHJlLmNvbXBpbGUocmV4cCkNCiAgICAg ICAgIG1hdGNoID0gcGF0dGVybi5maW5kYWxsKG91dCkNCkBAIC0yNzUsNiArMjkyLDIyIEBAIGNs YXNzIENyYihvYmplY3QpOg0KIA0KICAgICAgICAgcmV0dXJuIG1hdGNoWzBdDQogDQorICAgIGRl ZiBkaXNhYmxlX2lwdjYoc2VsZiwgaW50Zik6DQorICAgICAgICAiIiINCisgICAgICAgIERpc2Fi bGUgaXB2NiBvZiBvZiBzcGVjaWZpZWQgaW50ZXJmYWNlDQorICAgICAgICAiIiINCisgICAgICAg IGlmIGludGYgIT0gJ04vQSc6DQorICAgICAgICAgICAgc2VsZi5zZW5kX2V4cGVjdCg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gICAgICBzZWxmLmFsdF9zZXNzaW9uID0gU1NIQ29ubmVjdGlvbigNCisgICAgICAgICAg ICBzZWxmLmdldF9pcF9hZGRyZXNzKCksDQorICAgICAgICAgICAgc2VsZi5OQU1FICsgJ19hbHQn LA0KKyAgICAgICAgICAgIHNlbGYuZ2V0X3Bhc3N3b3JkKCkpDQogICAgICAgICBzZWxmLmFsdF9z ZXNzaW9uLmluaXRfbG9nKHNlbGYubG9nZ2VyKQ0KICAgICAgICAgc2VsZi5udW1iZXJfb2ZfY29y ZXMgPSAwDQogICAgICAgICBzZWxmLnRlc3RlciA9IE5vbmUNCiAgICAgICAgIHNlbGYuY29yZXMg PSBbXQ0KICAgICAgICAgc2VsZi5hcmNoaXRlY3R1cmUgPSBOb25lDQogICAgICAgICBzZWxmLnBv cnRzX2luZm8gPSBOb25lDQotICAgICAgICBzZWxmLmNvbmYgPSBVc2VyQ29uZigpDQorICAgICAg ICBzZWxmLmNvbmYgPSBQb3J0Q29uZigpDQogICAgICAgICBzZWxmLnBvcnRzX21hcCA9IFtdDQor ICAgICAgICBzZWxmLnZpcnRfcG9vbCA9IE5vbmUNCisNCisgICAgZGVmIGluaXRfaG9zdF9zZXNz aW9uKHNlbGYpOg0KKyAgICAgICAgaWYgc2VsZi5ob3N0X2luaXRfZmxhZzoNCisgICAgICAgICAg ICBwYXNzDQorICAgICAgICBlbHNlOg0KKyAgICAgICAgICAgIHNlbGYuaG9zdF9zZXNzaW9uID0g U1NIQ29ubmVjdGlvbigNCisgICAgICAgICAgICAgICAgc2VsZi5nZXRfaXBfYWRkcmVzcygpLA0K KyAgICAgICAgICAgICAgICBzZWxmLk5BTUUgKyAnX2hvc3QnLA0KKyAgICAgICAgICAgICAgICBz ZWxmLmdldF9wYXNzd29yZCgpKQ0KKyAgICAgICAgICAgIHNlbGYuaG9zdF9zZXNzaW9uLmluaXRf bG9nKHNlbGYubG9nZ2VyKQ0KKyAgICAgICAgICAgIHNlbGYuaG9zdF9pbml0X2ZsYWc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AgICAg ICBwY2lfaWQgPSBwb3J0Wyd0eXBlJ10NCiAgICAgICAgICAgICAjIGdldCBkZXZpY2UgZHJpdmVy DQotICAgICAgICAgICAgZHJpdmVyID0gZHRzLmdldF9uaWNfZHJpdmVyKHBjaV9pZCkNCisgICAg ICAgICAgICBkcml2ZXIgPSBzZXR0aW5ncy5nZXRfbmljX2RyaXZlcihwY2lfaWQpDQogICAgICAg ICAgICAgaWYgZHJpdmVyIGlzIG5vdCBOb25lOg0KICAgICAgICAgICAgICAgICAjIHVuYmluZCBk ZXZpY2UgZHJpdmVyDQogICAgICAgICAgICAgICAgIGFkZHJfYXJyYXkgPSBwY2lfYnVzLnNwbGl0 KCc6JykNCiAgICAgICAgICAgICAgICAgYnVzX2lkID0gYWRkcl9hcnJheVswXQ0KICAgICAgICAg ICAgICAgICBkZXZmdW5faWQgPSBhZGRyX2FycmF5WzFdDQogDQorICAgICAgICAgICAgICAgIHBv cnQgPSBOZXREZXZpY2Uoc2VsZiwgYnVzX2lkLCBkZXZmdW5faWQpDQorDQogICAgICAgICAgICAg ICAgIHNlbGYuc2VuZF9leHBlY3QoJ2VjaG8gMDAwMDolcyA+IC9zeXMvYnVzL3BjaS9kZXZpY2Vz LzAwMDBcOiVzXDolcy9kcml2ZXIvdW5iaW5kJw0KICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICUgKHBjaV9idXMsIGJ1c19pZCwgZGV2ZnVuX2lkKSwgJyMgJykNCiAgICAgICAgICAg ICAgICAgIyBiaW5kIHRvIGxpbnV4IGtlcm5lbCBkcml2ZXINCiAgICAgICAgICAgICAgICAgc2Vs Zi5zZW5kX2V4cGVjdCgnbW9kcHJvYmUgJXMnICUgZHJpdmVyLCAnIyAnKQ0KICAgICAgICAgICAg ICAgICBzZWxmLnNlbmRfZXhwZWN0KCdlY2hvIDAwMDA6JXMgPiAvc3lzL2J1cy9wY2kvZHJpdmVy cy8lcy9iaW5kJw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICUgKHBjaV9idXMs IGRyaXZlciksICcjICcpDQotICAgICAgICAgICAgICAgIGl0ZiA9IHNlbGYuZ2V0X2ludGVyZmFj ZV9uYW1lKGFkZHJfYXJyYXlbMF0sIGFkZHJfYXJyYXlbMV0pDQorICAgICAgICAgICAgICAgIGl0 ZiA9IHBvcnQuZ2V0X2ludGVyZmFjZV9uYW1lKCkNCiAgICAgICAgICAgICAgICAgc2VsZi5zZW5k X2V4cGVjdCgiaWZjb25maWcgJXMgdXAiICUgaXRmLCAiIyAiKQ0KICAgICAgICAgICAgIGVsc2U6 DQogICAgICAgICAgICAgICAgIHNlbGYubG9nZ2VyLmluZm8oIk5PVCBGT1VORCBEUklWRVIgRk9S IFBPUlQgKCVzfCVzKSEhISIgJSAocGNpX2J1cywgcGNpX2lkKSkNCkBAIC0yMjgsNyArMjU4LDEw IEBAIGNsYXNzIER1dChDcmIpOg0KICAgICAgICAgIiIiDQogICAgICAgICBTZXR1cCBMaW51eCBo dWdlcGFnZXMuDQogICAgICAgICAiIiINCi0gICAgICAgIGh1Z2VwYWdlc19zaXplID0gc2VsZi5z ZW5kX2V4cGVjdCgiYXdrICcvSHVnZXBhZ2VzaXplLyB7cHJpbnQgJDJ9JyAvcHJvYy9tZW1pbmZv IiwgIiMgIikNCisgICAgICAgIGlmIHNlbGYudmlydHR5cGUgPT0gJ3hlbic6DQorICAgICAgICAg ICAgcmV0dXJuDQorICAgICAgICBodWdlcGFnZXNfc2l6ZSA9IHNlbGYuc2VuZF9leHBlY3QoDQor ICAgICAgICAgICAgImF3ayAnL0h1Z2VwYWdlc2l6ZS8ge3ByaW50ICQyfScgL3Byb2MvbWVtaW5m byIsICIjICIpDQogDQogICAgICAgICBpZiBpbnQoaHVnZXBhZ2VzX3NpemUpIDwgKDEwMjQgKiAx MDI0KToNCiAgICAgICAgICAgICBpZiBzZWxmLmFyY2hpdGVjdHVyZSA9PSAieDg2XzY0IjoNCkBA IC0yNjUsNiArMjk4LDIwIEBAIGNsYXNzIER1dChDcmIpOg0KIA0KICAgICAgICAgcmV0dXJuICd0 YXNrc2V0ICVzICcgJSBjb3JlDQogDQorICAgIGRlZiBpc19zc2hfc2Vzc2lvbl9wb3J0KHNlbGYs IHBjaV9idXMpOg0KKyAgICAgICAgIiIiDQorICAgICAgICBDaGVjayBpZiB0aGUgcGNpIGRldmlj ZSBpcyB0aGUgZHV0IFNTSCBzZXNzaW9uIHBvcnQuDQorICAgICAgICAiIiINCisgICAgICAgIHBv cnQgPSBOb25lDQorICAgICAgICBmb3IgcG9ydF9pbmZvIGluIHNlbGYucG9ydHNfaW5mbzoNCisg ICAgICAgICAgICBpZiBwY2lfYnVzID09IHBvcnRfaW5mb1sncGNpJ106DQorICAgICAgICAgICAg ICAgIHBvcnQgPSBwb3J0X2luZm9bJ3BvcnQnXQ0KKyAgICAgICAgICAgICAgICBicmVhaw0KKyAg ICAgICAgaWYgcG9ydCBhbmQgcG9ydC5nZXRfaXB2NF9hZGRyKCkgPT0gY3Jic1snSVAnXS5zdHJp cCgpOg0KKyAgICAgICAgICAgIHJldHVybiBUcnVlDQorICAgICAgICBlbHNlOg0KKyAgICAgICAg ICAgIHJldHVybiBGYWxzZQ0KKw0KICAgICBkZWYgYmluZF9pbnRlcmZhY2VzX2xpbnV4KHNlbGYs IGRyaXZlcj0naWdiX3VpbycsIG5pY3NfdG9fYmluZD1Ob25lKToNCiAgICAgICAgICIiIg0KICAg ICAgICAgQmluZCB0aGUgaW50ZXJmYWNlcyB0byB0aGUgc2VsZWN0ZWQgZHJpdmVyLiBuaWNzX3Rv X2JpbmQgY2FuIGJlIE5vbmUNCkBAIC0yNzUsMTIgKzMyMiwxNyBAQCBjbGFzcyBEdXQoQ3JiKToN CiANCiAgICAgICAgIGN1cnJlbnRfbmljID0gMA0KICAgICAgICAgZm9yIChwY2lfYnVzLCBwY2lf aWQpIGluIHNlbGYucGNpX2RldmljZXNfaW5mbzoNCi0gICAgICAgICAgICBpZiBkdHMuYWNjZXB0 ZWRfbmljKHBjaV9pZCk6DQorICAgICAgICAgICAgaWYgc2V0dGluZ3MuYWNjZXB0ZWRfbmljKHBj aV9pZCk6DQorICAgICAgICAgICAgICAgIGlmIHNlbGYuaXNfc3NoX3Nlc3Npb25fcG9ydChwY2lf YnVzKToNCisgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlDQogDQogICAgICAgICAgICAgICAg IGlmIG5pY3NfdG9fYmluZCBpcyBOb25lIG9yIGN1cnJlbnRfbmljIGluIG5pY3NfdG9fYmluZDoN CiAgICAgICAgICAgICAgICAgICAgIGJpbmRpbmdfbGlzdCArPSAnJXMgJyAlIChwY2lfYnVzKQ0K IA0KICAgICAgICAgICAgICAgICBjdXJyZW50X25pYyArPSAxDQorICAgICAgICBpZiBjdXJyZW50 X25pYyA9PSAwOg0KKyAgICAgICAgICAgIHNlbGYubG9nZ2VyLmluZm8oIk5vdCBuaWMgbmVlZCBi aW5kIGRyaXZlcjogJXMiICUgZHJpdmVyKQ0KKyAgICAgICAgICAgIHJldHVybg0KIA0KICAgICAg ICAgc2VsZi5zZW5kX2V4cGVjdCgndG9vbHMvZHBka19uaWNfYmluZC5weSAlcycgJSBiaW5kaW5n X2xpc3QsICcjICcpDQogDQpAQCAtMjkzLDEzICszNDUsMTkgQEAgY2xhc3MgRHV0KENyYik6DQog DQogICAgICAgICBjdXJyZW50X25pYyA9IDANCiAgICAgICAgIGZvciAocGNpX2J1cywgcGNpX2lk KSBpbiBzZWxmLnBjaV9kZXZpY2VzX2luZm86DQotICAgICAgICAgICAgaWYgZHRzLmFjY2VwdGVk X25pYyhwY2lfaWQpOg0KKyAgICAgICAgICAgIGlmIHNldHRpbmdzLmFjY2VwdGVkX25pYyhwY2lf aWQpOg0KKyAgICAgICAgICAgICAgICBpZiBzZWxmLmlzX3NzaF9zZXNzaW9uX3BvcnQocGNpX2J1 cyk6DQorICAgICAgICAgICAgICAgICAgICBjb250aW51ZQ0KIA0KICAgICAgICAgICAgICAgICBp ZiBuaWNzX3RvX2JpbmQgaXMgTm9uZSBvciBjdXJyZW50X25pYyBpbiBuaWNzX3RvX2JpbmQ6DQog ICAgICAgICAgICAgICAgICAgICBiaW5kaW5nX2xpc3QgKz0gJyVzICcgJSAocGNpX2J1cykNCiAN CiAgICAgICAgICAgICAgICAgY3VycmVudF9uaWMgKz0gMQ0KIA0KKyAgICAgICAgaWYgY3VycmVu dF9uaWMgPT0gMDoNCisgICAgICAgICAgICBzZWxmLmxvZ2dlci5pbmZvKCJOb3QgbmljIG5lZWQg dW5iaW5kIGRyaXZlciIpDQorICAgICAgICAgICAgcmV0dXJuDQorDQogICAgICAgICBzZWxmLnNl bmRfZXhwZWN0KCd0b29scy9kcGRrX25pY19iaW5kLnB5ICVzJyAlIGJpbmRpbmdfbGlzdCwgJyMg JywgMzApDQogDQogICAgIGRlZiBnZXRfcG9ydHMoc2VsZiwgbmljX3R5cGU9J2FueScsIHBlcmY9 Tm9uZSwgc29ja2V0PU5vbmUpOg0KQEAgLTMxNCwxNCArMzcyLDE3IEBAIGNsYXNzIER1dChDcmIp Og0KICAgICAgICAgICAgIHBlcmYgPSBzZWxmLndhbnRfcGVyZl90ZXN0cw0KIA0KICAgICAgICAg bmljdHlwZXMgPSBbXQ0KLSAgICAgICAgaWYgbmljX3R5cGUgPT0gJ2FueSc6DQorICAgICAgICBp ZiBzZWxmLm5pY190eXBlID09ICdhbnknOg0KICAgICAgICAgICAgIGZvciBwb3J0aWQgaW4gcmFu Z2UobGVuKHNlbGYucG9ydHNfaW5mbykpOg0KICAgICAgICAgICAgICAgICBwb3J0cy5hcHBlbmQo cG9ydGlkKQ0KICAgICAgICAgICAgIHJldHVybiBwb3J0cw0KLSAgICAgICAgZWxpZiBuaWNfdHlw ZSA9PSAnY2ZnJzoNCisgICAgICAgIGVsaWYgc2VsZi5uaWNfdHlwZSA9PSAnY2ZnJzoNCiAgICAg ICAgICAgICBmb3IgcG9ydGlkIGluIHJhbmdlKGxlbihzZWxmLnBvcnRzX2luZm8pKToNCiAgICAg ICAgICAgICAgICAgaWYgc2VsZi5wb3J0c19pbmZvW3BvcnRpZF1bJ3NvdXJjZSddID09ICdjZmcn Og0KLSAgICAgICAgICAgICAgICAgICAgcG9ydHMuYXBwZW5kKHBvcnRpZCkNCisgICAgICAgICAg ICAgICAgICAgIGlmIChzb2NrZXQgaXMgTm9uZSBvcg0KKyAgICAgICAgICAgICAgICAgICAgICAg IHNlbGYucG9ydHNfaW5mb1twb3J0aWRdWydudW1hJ10gPT0gLTEgb3INCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgc29ja2V0ID09IHNlbGYucG9ydHNfaW5mb1twb3J0aWRdWydudW1hJ10p Og0KKyAgICAgICAgICAgICAgICAgICAgICAgIHBvcnRzLmFwcGVuZChwb3J0aWQpDQogICAgICAg ICAgICAgcmV0dXJuIHBvcnRzDQogICAgICAgICBlbHNlOg0KICAgICAgICAgICAgIGZvciBwb3J0 aWQgaW4gcmFuZ2UobGVuKHNlbGYucG9ydHNfaW5mbykpOg0KQEAgLTQ0MCwzNiArNTAxLDM4IEBA IGNsYXNzIER1dChDcmIpOg0KICAgICAgICAgQ2hlY2sgdGhhdCB3aGV0aGVyIGF1dG8gc2Nhbm5l ZCBwb3J0cyByZWFkeSB0byB1c2UNCiAgICAgICAgICIiIg0KICAgICAgICAgcGNpX2FkZHIgPSAi JXM6JXMiICUgKHBjaV9idXMsIHBjaV9pZCkNCi0gICAgICAgIGlmIHNlbGYubmljID09ICdhbnkn Og0KKyAgICAgICAgaWYgc2VsZi5uaWNfdHlwZSA9PSAnYW55JzoNCiAgICAgICAgICAgICByZXR1 cm4gVHJ1ZQ0KLSAgICAgICAgZWxpZiBzZWxmLm5pYyA9PSAnY2ZnJzoNCisgICAgICAgIGVsaWYg c2VsZi5uaWNfdHlwZSA9PSAnY2ZnJzoNCiAgICAgICAgICAgICBpZiBzZWxmLmNvbmYuY2hlY2tf cG9ydF9hdmFpbGFibGUocGNpX2J1cykgaXMgVHJ1ZToNCiAgICAgICAgICAgICAgICAgcmV0dXJu IFRydWUNCi0gICAgICAgIGVsaWYgc2VsZi5uaWMgbm90IGluIE5JQ1Mua2V5cygpOg0KLSAgICAg ICAgICAgIHNlbGYubG9nZ2VyLndhcm5pbmcoIk5PVCBTVVBQT1JURUQgTklDIFRZUEU6ICVzIiAl IHNlbGYubmljKQ0KKyAgICAgICAgZWxpZiBzZWxmLm5pY190eXBlIG5vdCBpbiBOSUNTLmtleXMo KToNCisgICAgICAgICAgICBzZWxmLmxvZ2dlci53YXJuaW5nKCJOT1QgU1VQUE9SVEVEIE5JQyBU WVBFOiAlcyIgJSBzZWxmLm5pY190eXBlKQ0KICAgICAgICAgZWxzZToNCi0gICAgICAgICAgICBj b2RlbmFtZSA9IE5JQ1Nbc2VsZi5uaWNdDQorICAgICAgICAgICAgY29kZW5hbWUgPSBOSUNTW3Nl bGYubmljX3R5cGVdDQogICAgICAgICAgICAgaWYgcGNpX2lkID09IGNvZGVuYW1lOg0KICAgICAg ICAgICAgICAgICByZXR1cm4gVHJ1ZQ0KIA0KICAgICAgICAgcmV0dXJuIEZhbHNlDQogDQogICAg IGRlZiByZXNjYW5fcG9ydHMoc2VsZik6DQotICAgICAgICB1bmtub3dfaW50ZXJmYWNlID0gZHRz LlJFRCgnU2tpcHBlZDogdW5rbm93X2ludGVyZmFjZScpDQorICAgICAgICB1bmtub3dfaW50ZXJm YWNlID0gUkVEKCdTa2lwcGVkOiB1bmtub3dfaW50ZXJmYWNlJykNCiANCiAgICAgICAgIGZvciBw b3J0X2luZm8gaW4gc2VsZi5wb3J0c19pbmZvOg0KICAgICAgICAgICAgIHBjaV9idXMgPSBwb3J0 X2luZm9bJ3BjaSddDQogICAgICAgICAgICAgYWRkcl9hcnJheSA9IHBjaV9idXMuc3BsaXQoJzon KQ0KICAgICAgICAgICAgIGJ1c19pZCA9IGFkZHJfYXJyYXlbMF0NCiAgICAgICAgICAgICBkZXZm dW5faWQgPSBhZGRyX2FycmF5WzFdDQotICAgICAgICAgICAg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0KICAgICAgICAgICAgIHBvcnRfaW5mb1snaW50ZiddID0gaW50Zg0KICAgICAg ICAgICAgIHBvcnRfaW5mb1snaXB2NiddID0gaXB2Ng0KIA0KKyAgICBkZWYgbG9hZF9zZXJpYWxp emVyX3BvcnRzKHNlbGYpOg0KKyAgICAgICAgc2VsZi5wb3J0c19pbmZvID0gW10NCisgICAgICAg IGNhY2hlZF9wb3J0c19pbmZvID0gc2VsZi5zZXJpYWxpemVyLmxvYWQoc2VsZi5QT1JUX0lORk9f Q0FDSEVfS0VZKQ0KKyAgICAgICAgaWYgY2FjaGVkX3BvcnRzX2luZm8gaXMgTm9uZToNCisgICAg ICAgICAgICByZXR1cm4NCisgICAgICAgIGZvciBwb3J0IGluIGNhY2hlZF9wb3J0c19pbmZvOg0K KyAgICAgICAgICAgIHNlbGYucG9ydHNfaW5mby5hcHBlbmQoeydwY2knOiBwb3J0WydwY2knXSwg J3R5cGUnOiBwb3J0Wyd0eXBlJ10sDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgJ251bWEnOiBwb3J0WydudW1hJ119KQ0KKw0KKyAgICBkZWYgc2F2ZV9zZXJpYWxpemVyX3Bv cnRzKHNlbGYpOg0KKyAgICAgICAgY2FjaGVkX3BvcnRzX2luZm8gPSBbXQ0KKyAgICAgICAgZm9y IHBvcnQgaW4gc2VsZi5wb3J0c19pbmZvOg0KKyAgICAgICAgICAgIGNhY2hlZF9wb3J0c19pbmZv LmFwcGVuZCh7J3BjaSc6IHBvcnRbJ3BjaSddLCAndHlwZSc6IHBvcnRbJ3R5cGUnXSwNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdudW1hJzogcG9ydFsnbnVtYSddfSkN CisgICAgICAgIHNlbGYuc2VyaWFsaXplci5zYXZlKHNlbGYuUE9SVF9JTkZPX0NBQ0hFX0tFWSwg Y2FjaGVkX3BvcnRzX2luZm8pDQorDQogICAgIGRlZiBzY2FuX3BvcnRzKHNlbGYpOg0K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p cHBlZDogVW5rbm93bi9ub3Qgc2VsZWN0ZWQnKQ0KKyAgICAgICAgc2tpcHBlZCA9IFJFRCgnU2tp cHBlZDogVW5rbm93bi9ub3Qgc2VsZWN0ZWQnKQ0KIA0KICAgICAgICAgZm9yIChwY2lfYnVzLCBw Y2lfaWQpIGluIHNlbGYucGNpX2RldmljZXNfaW5mbzoNCiANCi0gICAgICAgICAgICBpZiBub3Qg ZHRzLmFjY2VwdGVkX25pYyhwY2lfaWQpOg0KKyAgICAgICAgICAgIGlmIG5vdCBzZXR0dGluZ3Mu YWNjZXB0ZWRfbmljKHBjaV9pZCk6DQogICAgICAgICAgICAgICAgIHNlbGYubG9nZ2VyLmluZm8o IkRVVDogWyVzICVzXSAlcyIgJSAocGNpX2J1cywgcGNpX2lkLA0KICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNraXBwZWQpKQ0KICAgICAgICAg ICAgICAgICBjb250aW51ZQ0KIA0KLSAgICAgICAgICAgIGludGYgPSBzZWxmLmdldF9pbnRlcmZh Y2VfbmFtZShwY2lfYnVzKQ0KKyAgICAgICAgICAgIHBvcnQgPSBOZXREZXZpY2Uoc2VsZiwgcGNp X2J1cywgJycpDQorICAgICAgICAgICAgaW50ZiA9IHBvcnQuZ2V0X2ludGVyZmFjZV9uYW1lKHBj aV9idXMpDQogDQogICAgICAgICAgICAgbWFjYWRkciA9IHNlbGYuZ2V0X21hY19hZGRyKGludGYp DQogICAgICAgICAgICAgaXB2NiA9IHNlbGYuZ2V0X2lwdjZfYWRkcihpbnRmKQ0KQEAgLTU2MCw5 ICs2NDIsOTMgQEAgY2xhc3MgRHV0KENyYik6DQogICAgICAgICAgICAgcGNpX3N0ciA9ICIlczol cy4lcyIgJSAocGNpX2J1c19pZCwgcGNpX2Rldl9zdHIsIHBjaV9zcGxpdFsyXSkNCiANCiAgICAg ICAgICAgICAjIHN0b3JlIHRoZSBwb3J0IGluZm8gdG8gcG9ydCBt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KQ0KKyAgICAgICAg ICAgICAgICBpZiBnZXRhdHRyKHNlbGYsICdzZW5kX3Bpbmc2JywgTm9uZSk6DQorICAgICAgICAg ICAgICAgICAgICBzZWxmLnNlbmRfcGluZzYoDQorICAgICAgICAgICAgICAgICAgICAgICAgZHV0 UG9ydCwgc2VsZi50ZXN0ZXIucG9ydHNfaW5mb1tyZW1vdGVQb3J0XVsnaXB2NiddKQ0KKyAgICAg ICAgICAgICAgICBvdXQgPSBzZWxmLnRlc3Rlci5zZW5kX3Bpbmc2KA0KKyAgICAgICAgICAgICAg ICAgICAgcmVtb3RlUG9ydCwgaXB2Niwgc2VsZi5nZXRfbWFjX2FkZHJlc3MoZHV0UG9ydCkpDQog DQogICAgICAgICAgICAgICAgIGlmICgnNjQgYnl0ZXMgZnJvbScgaW4gb3V0KToNCiAgICAgICAg ICAgICAgICAgICAgIHNlbGYubG9nZ2VyLmluZm8oIlBPUlQgTUFQOiBbZHV0ICVkOiB0ZXN0ZXIg JWRdIiAlIChkdXRQb3J0LCByZW1vdGVQb3J0KSkNCkBAIC02NTYsMyArODI2LDMxIEBAIGNsYXNz IER1dChDcmIpOg0KIA0KICAgICAgICAgZm9yIHBvcnQgaW4gcmVtb3ZlOg0KICAgICAgICAgICAg IHNlbGYucG9ydHNfaW5mby5yZW1vdmUocG9ydCkNCisNCisgICAgZGVmIGRpc2FibGVfdGVzdGVy X2lwdjYoc2VsZik6DQorICAgICAgICBmb3IgdGVzdGVyX3BvcnQgaW4gc2VsZi5wb3J0c19tYXA6 DQorICAgICAgICAgICAgaW50ZiA9IHNlbGYudGVzdGVyLmdldF9pbnRlcmZhY2UodGVzdGVyX3Bv cnQpDQorICAgICAgICAgICAgc2VsZi50ZXN0ZXIuZGlzYWJsZV9pcHY2KGludGYpDQorDQorICAg IGRlZiBlbmFibGVfdGVzdGVyX2lwdjYoc2VsZik6DQorICAgICAgICBmb3IgdGVzdGVyX3BvcnQg aW4gc2VsZi5wb3J0c19tYXA6DQorICAgICAgICAgICAgaW50ZiA9IHNlbGYudGVzdGVyLmdldF9p bnRlcmZhY2UodGVzdGVyX3BvcnQpDQorICAgICAgICAgICAgc2VsZi50ZXN0ZXIuZW5hYmxlX2lw djYoaW50ZikNCisNCisgICAgZGVmIGNoZWNrX3BvcnRfb2NjdXBpZWQoc2VsZiwgcG9ydCk6DQor ICAgICAgICBvdXQgPSBzZWxmLmFsdF9zZXNzaW9uLnNlbmRfZXhwZWN0KCdsc29mIC1pOiVkJyAl IHBvcnQsICcjICcpDQorICAgICAgICBpZiBvdXQgPT0gJyc6DQorICAgICAgICAgICAgcmV0dXJu IEZhbHNlDQorICAgICAgICBlbHNlOg0KKyAgICAgICAgICAgIHJldHVybiBUcnVlDQorDQorICAg IGRlZiBnZXRfbWF4aW1hbF92bmNfbnVtKHNlbGYpOg0KKyAgICAgICAgb3V0ID0gc2VsZi5zZW5k X2V4cGVjdCgicHMgYXV4IHwgZ3JlcCAnXC12bmMnIHwgZ3JlcCAtdiBncmVwIiwgJyMgJykNCisg ICAgICAgIGlmIG91dDoNCisgICAgICAgICAgICBwb3J0cyA9IHJlLmZpbmRhbGwocictdm5jIC4q PzooXGQrKScsIG91dCkNCisgICAgICAgICAgICBmb3IgbnVtIGluIHJhbmdlKGxlbihwb3J0cykp Og0KKyAgICAgICAgICAgICAgICBwb3J0c1tudW1dID0gaW50KHBvcnRzW251bV0pDQorICAgICAg ICAgICAgICAgIHBvcnRzLnNvcnQoKQ0KKyAgICAgICAgZWxzZToNCisgICAgICAgICAgICBwb3J0 cyA9IFswLCBdDQorICAgICAgICByZXR1cm4gcG9ydHNbLTFdDQpkaWZmIC0tZ2l0IGEvZnJhbWV3 b3JrL25ldF9kZXZpY2UucHkgYi9mcmFtZXdvcmsvbmV0X2RldmljZS5weQ0KbmV3IGZpbGUgbW9k ZSAxMDA2NDQNCmluZGV4IDAwMDAwMDAuLmMwNGQ0NDINCi0tLSAvZGV2L251bGwNCisrKyBiL2Zy YW1ld29yay9uZXRfZGV2a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ZHJpdmVyICE9IGN1cnJlbnRf ZHJpdmVyOg0KKyAgICAgICAgICAgIHNlbGYuYmluZF9kcml2ZXIoKQ0KKyAgICAgICAgaWYgc2Vs Zi5uaWNfaXNfcGYoKToNCisgICAgICAgICAgICBzZWxmLmRlZmF1bHRfdmZfZHJpdmVyID0gJycN CisgICAgICAgIHNlbGYuaW50Zl9uYW1lID0gc2VsZi5nZXRfaW50ZXJmYWNlX25hbWUoKQ0KKw0K KyAgICBkZWYgX19zZW5kX2V4cGVjdChzZWxmLCBjbWRzLCBleHBlY3RlZCwgdGltZW91dD1USU1F T1VULCBhbHRfc2Vzc2lvbj1UcnVlKToNCisgICAgICAgICIiIg0KKyAgICAgICAgV3JhcCB0aGUg Y3JiYHMgc2Vzc2lvbiBhcyBwcml2YXRlIHNlc3Npb24gZm9yIHNlbmRpbmcgZXhwZWN0Lg0KKyAg ICAgICAgIiIiDQorICAgICAgICByZXR1cm4gc2VsZi5jcmIuc2VuZF9leHBlY3QoY21kcywgZXhw ZWN0ZWQsIHRpbWVvdXQ9dGltZW91dCwgYWx0X3Nlc3Npb249YWx0X3Nlc3Npb24pDQorDQorICAg IGRlZiBfX2dldF9vc190eXBlKHNlbGYpOg0KKyAgICAgICAgIiIiDQorICAgICAgICBHZXQgT1Mg dHlwZS4NCisgICAgICAgICIiIg0KKyAgICAgICAgcmV0dXJuIHNlbGYuY3JiLmdldF9vc190eXBl KCkNCisNCisgICAgZGVmIG5pY19pc19wZihzZWxmKToNCisgICAgICAgICIiIg0KKyAgICAgICAg SXQgaXMgdGhlIG1ldGhvZCB0aGF0IHlvdSBjYW4gY2hlY2sgaWYgdGhlIG5pYyBpcyBQRi4NCisg ICAgICAgICIiIg0KKyAgICAgICAgcmV0dXJuIFRydWUNCisNCisgICAgZGVmIG5pY19oYXNfZHJp dmVyKGZ1bmMpOg0KKyAgICAgICAgIiIiDQorICAgICAgICBDaGVjayBpZiB0aGUgTklDIGhhcyBh IGRyaXZlci4NCisgICAgICAgICIiIg0KKyAgICAgICAgQHdyYXBzKGZ1bmMpDQorICAgICAgICBk ZWYgd3JhcHBlcigqYXJncywgKiprd2FyZ3MpOg0KKyAgICAgICAgICAgIG5pY19pbnN0YW5jZSA9 IGFyZ3NbMF0NCisgICAgICAgICAgICBuaWNfaW5zdGFuY2UuY3VycmVudF9kcml2ZXIgPSBuaWNf aW5zdGFuY2UuZ2V0X25pY19kcml2ZXIoKQ0KKyAgICAgICAgICAgIGlmIG5vdCBuaWNfaW5zdGFu Y2UuY3VycmVudF9kcml2ZXI6DQorICAgICAgICAgICAgICAgIHJldHVybiAnJw0KKyAgICAgICAg ICAgIHJldHVybiBmdW5jKCphcmdzLCAqKmt3YXJncykNCisgICAgICAgIHJldHVybiB3cmFwcGVy DQorDQorICAgIGRlZiBnZXRfbmljX2RyaXZlcihzZWxmKToNCisgICAgICAgICIiIg0KKyAgICAg ICAgR2V0IHRoZSBOSUMgZHJpdmVyLg0KKyAgICAgICAgIiIiDQorICAgICAgICByZXR1cm4gc2Vs Zi5jcmIuZ2V0X3BjaV9kZXZfZHJpdmVyKHNlbGYuYnVzX2lkLCBzZWxmLmRldmZ1bl9pZCkNCisN CisgICAgQG5pY19oYXNfZHJpdmVyDQorICAgIGRlZiBnZXRfaW50ZXJmYWNlX25hbWUoc2VsZik6 DQorICAgICAgICAiIiINCisgICAgICAgIEdldCBpbnRlcmZhY2UgbmFtZSBvZiBzcGVjaWZpZWQg cGNpIGRldmljZS4NCisgICAgICAgICIiIg0KKyAgICAgICAgZ2V0X2ludGVyZmFjZV9uYW1lID0g Z2V0YXR0cigNCisgICAgICAgICAgICBzZWxmLCAnZ2V0X2ludGVyZmFjZV9uYW1lXyVzJyAlDQor ICAgICAgICAgICAgc2VsZi5fX2dldF9vc190eXBlKCkpDQorICAgICAgICByZXR1cm4gZ2V0X2lu dGVyZmFjZV9uYW1lKHNlbGYuYnVzX2lkLCBzZWxmLmRldmZ1bl9pZCwgc2VsZi5jdXJyZW50X2Ry aXZlcikNCisNCisgICAgZGVmIGdldF9pbnRlcmZhY2VfbmFtZV9saW51eChzZWxmLCBidXNfaWQs IGRldmZ1bl9pZCwgZHJpdmVyKToNCisgICAgICAgICIiIg0KKyAgICAgICAgR2V0IGludGVyZmFj ZSBuYW1lIG9mIHNwZWNpZmllZCBwY2kgZGV2aWNlIG9uIGxpbnV4Lg0KKyAgICAgICAgIiIiDQor ICAgICAgICB0cnk6DQorICAgICAgICAgICAgZ2V0X2ludGVyZmFjZV9uYW1lX2xpbnV4ID0gZ2V0 YXR0cigNCisgICAgICAgICAgICAgICAgc2VsZiwNCisgICAgICAgICAgICAgICAgJ2dldF9pbnRl cmZhY2VfbmFtZV9saW51eF8lcycgJQ0KKyAgICAgICAgICAgICAgICBkcml2ZXIpDQorICAgICAg ICBleGNlcHQgRXhjZXB0aW9uIGFzIGU6DQorICAgICAgICAgICAgZ2VuZXJpY19kcml2ZXIgPSAn Z2VuZXJpYycNCisgICAgICAgICAgICBnZXRfaW50ZXJmYWNlX25hbWVfbGludXggPSBnZXRhdHRy KHNlbGYsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAn Z2V0X2ludGVyZmFjZV9uYW1lX2xpbnV4XyVzJyAlIGdlbmVyaWNfZHJpdmVyKQ0KKw0KKyAgICAg ICAgcmV0dXJuIGdldF9pbnRlcmZhY2VfbmFtZV9saW51eChidXNfaWQsIGRldmZ1bl9pZCkNCisN CisgICAgZGVmIGdldF9pbnRlcmZhY2VfbmFtZV9saW51eF9nZW5lcmljKHNlbGYsIGJ1c19pZCwg ZGV2ZnVuX2lkKToNCisgICAgICAgICIiIg0KKyAgICAgICAgR2V0IHRoZSBpbnRlcmZhY2UgbmFt ZSBieSB0aGUgZGVmYXVsdCB3YXkgb24gbGludXguDQorICAgICAgICAiIiINCisgICAgICAgIGNv bW1hbmQgPSAnbHMgLS1jb2xvcj1uZXZlciAvc3lzL2J1cy9wY2kvZGV2aWNlcy8wMDAwXDolc1w6 JXMvbmV0JyAlICgNCisgICAgICAgICAgICBidXNfaWQsIGRldmZ1bl9pZCkNCisgICAgICAgIHJl dHVybiBzZWxmLl9fc2VuZF9leHBlY3QoY29tbWFuZCwgJyMgJykNCisNCisgICAgZGVmIGdldF9p bnRlcmZhY2VfbmFtZV9mcmVlYnNkKHNlbGYsIGJ1c19pZCwgZGV2ZnVuX2lkLCBkcml2ZXIpOg0K KyAgICAgICAgIiIiDQorICAgICAgICBHZXQgaW50ZXJmYWNlIG5hbWUgb2Ygc3BlY2lmaWVkIHBj aSBkZXZpY2Ugb24gRnJlZWJzZC4NCisgICAgICAgICIiIg0KKyAgICAgICAgdHJ5Og0KKyAgICAg ICAgICAgIGdldF9pbnRlcmZhY2VfbmFtZV9saW51eCA9IGdldGF0dHIoc2VsZiwNCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdnZXRfaW50ZXJmYWNlX25h bWVfZnJlZWJzZF8lcycgJSBkcml2ZXIpDQorICAgICAgICBleGNlcHQgRXhjZXB0aW9uIGFzIGU6 DQorICAgICAgICAgICAgZ2VuZXJpY19kcml2ZXIgPSAnZ2VuZXJpYycNCisgICAgICAgICAgICBn ZXRfaW50ZXJmYWNlX25hbWVfbGludXggPSBnZXRhdHRyKHNlbGYsDQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZ2V0X2ludGVyZmFjZV9uYW1lX2ZyZWVi c2RfJXMnICUgZ2VuZXJpY19kcml2ZXIpDQorDQorICAgICAgICByZXR1cm4gZ2V0X2ludGVyZmFj ZV9uYW1lX2ZyZWVic2QoYnVzX2lkLCBkZXZmdW5faWQpDQorDQorICAgIGRlZiBnZXRfaW50ZXJm YWNlX25hbWVfZnJlZWJzZF9nZW5lcmljKHNlbGYsIGJ1c19pZCwgZGV2ZnVuX2lkKToNCisgICAg ICAgICIiIg0KKyAgICAgICAgR2V0IHRoZSBpbnRlcmZhY2UgbmFtZSBieSB0aGU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F8lcycgJQ0KKyAgICAgICAgICAgICAgICBkcml2ZXIpDQor ICAgICAgICBleGNlcHQgRXhjZXB0aW9uIGFzIGU6DQorICAgICAgICAgICAgZ2VuZXJpY19kcml2 ZXIgPSAnZ2VuZXJpYycNCisgICAgICAgICAgICBnZXRfbWFjX2FkZHJfbGludXggPSBnZXRhdHRy KA0KKyAgICAgICAgICAgICAgICBzZWxmLA0KKyAgICAgICAgICAgICAgICAnZ2V0X21hY19hZGRy X2xpbnV4XyVzJyAlDQorICAgICAgICAgICAgICAgIGdlbmVyaWNfZHJpdmVyKQ0KKw0KKyAgICAg ICAgcmV0dXJuIGdldF9tYWNfYWRkcl9saW51eChpbnRmLCBidXNfaWQsIGRldmZ1bl9pZCwgZHJp dmVyKQ0KKw0KKyAgICBkZWYgZ2V0X3BjaV9pZChzZWxmLCBidXNfaWQsIGRldmZ1bl9pZCk6DQor ICAgICAgICBjb21tYW5kID0gKCdjYXQgL3N5cy9idXMvcGNpL2RldmljZXMvMDAwMFw6JXNcOiVz L3ZlbmRvcicgJQ0KKyAgICAgICAgICAgICAgICAgICAoYnVzX2lkLCBkZXZmdW5faWQpKQ0KKyAg ICAgICAgb3V0ID0gc2VsZi5fX3NlbmRfZXhwZWN0KGNvbW1hbmQsICcjICcpDQorICAgICAgICB2 ZW5kZXIgPSBvdXRbMjpdDQorICAgICAgICBjb21tYW5kID0gKCdjYXQgL3N5cy9idXMvcGNpL2Rl dmljZXMvMDAwMFw6JXNcOiVzL2RldmljZScgJQ0KKyAgICAgICAgICAgICAgICAgICAoYnVzX2lk LCBkZXZmdW5faWQpKQ0KKyAgICAgICAgb3V0ID0gc2VsZi5fX3NlbmRfZXhwZWN0KGNvbW1hbmQs ICcjICcpDQorICAgICAgICBkZXZpY2UgPSBvdXRbMjpdDQorICAgICAgICByZXR1cm4gIiVzOiVz IiAlICh2ZW5kZXIsIGRldmljZSkNCisNCisgICAgZGVmIGdldF9tYWNfYWRkcl9saW51eF9nZW5l cmljKHNlbGYsIGludGYsIGJ1c19pZCwgZGV2ZnVuX2lkLCBkcml2ZXIpOg0KKyAgICAgICAgIiIi DQorICAgICAgICBHZXQgTUFDIGJ5IHRoZSBkZWZhdWx0IHdheSBvbiBsaW51eC4NCisgICAgICAg ICIiIg0KKyAgICAgICAgY29tbWFuZCA9ICgnY2F0IC9zeXMvYnVzL3BjaS9kZXZpY2VzLzAwMDBc OiVzXDolcy9uZXQvJXMvYWRkcmVzcycgJQ0KKyAgICAgICAgICAgICAgICAgICAoYnVzX2lkLCBk ZXZmdW5faWQsIGludGYpKQ0KKyAgICAgICAgcmV0dXJuIHNlbGYuX19zZW5kX2V4cGVjdChjb21t YW5kLCAnIyAnKQ0KKw0KKyAgICBkZWYgZ2V0X21hY19hZGRyX2ZyZWVic2Qoc2VsZiwgaW50Ziwg YnVzX2lkLCBkZXZmdW5faWQsIGRyaXZlcik6DQorICAgICAgICAiIiINCisgICAgICAgIEdldCBt YWMgYWRkcmVzcyBvZiBzcGVjaWZpZWQgcGNpIGRldmljZSBvbiBGcmVlYnNkLg0KKyAgICAgICAg IiIiDQorICAgICAgICB0cnk6DQorICAgICAgICAgICAgZ2V0X21hY19hZGRyX2ZyZWVic2QgPSBn ZXRhdHRyKA0KKyAgICAgICAgICAgICAgICBzZWxmLA0KKyAgICAgICAgICAgICAgICAnZ2V0X21h Y19hZGRyX2ZyZWVic2RfJXMnICUNCisgICAgICAgICAgICAgICAgZHJpdmVyKQ0KKyAgICAgICAg ZXhjZXB0IEV4Y2VwdGlvbiBhcyBlOg0KKyAgICAgICAgICAgIGdlbmVyaWNfZHJpdmVyID0gJ2dl bmVyaWMnDQorICAgICAgICAgICAgZ2V0X21hY19hZGRyX2ZyZWVic2QgPSBnZXRhdHRyKA0KKyAg ICAgICAgICAgICAgICBzZWxmLA0KKyAgICAgICAgICAgICAgICAnZ2V0X21hY19hZGRyX2ZyZWVi c2RfJXMnICUNCisgICAgICAgICAgICAgICAgZ2VuZXJpY19kcml2ZXIpDQorDQorIC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Ygc3BlY2lmaWVkIHBjaSBkZXZpY2Ugb24gbGludXguDQorICAg ICAgICAiIiINCisgICAgICAgIHRyeToNCisgICAgICAgICAgICBnZXRfaXB2NF9hZGRyX2xpbnV4 ID0gZ2V0YXR0cihzZWxmLCAnZ2V0X2lwdjRfbGludXhfJXMnICUgZHJpdmVyKQ0KKyAgICAgICAg ZXhjZXB0IEV4Y2VwdGlvbiBhcyBlOg0KKyAgICAgICAgICAgIGdlbmVyaWNfZHJpdmVyID0gJ2dl bmVyaWMnDQorICAgICAgICAgICAgZ2V0X2lwdjRfYWRkcl9saW51eCA9IGdldGF0dHIoDQorICAg ICAgICAgICAgICAgIHNlbGYsICdnZXRfaXB2NF9saW51eF8lcycgJQ0KKyAgICAgICAgICAgICAg ICBnZW5lcmljX2RyaXZlcikNCisNCisgICAgICAgIHJldHVybiBnZXRfaXB2NF9hZGRyX2xpbnV4 KGludGYsIGJ1c19pZCwgZGV2ZnVuX2lkLCBkcml2ZXIpDQorDQorICAgIGRlZiBnZXRfaXB2NF9h ZGRyX2xpbnV4X2dlbmVyaWMoc2VsZiwgaW50Zik6DQorICAgICAgICAiIiINCisgICAgICAgIEdl dCBJUHY0IGFkZHJlc3MgYnkgdGhlIGRlZmF1bHQgd2F5IG9uIGxpbnV4Lg0KKyAgICAgICAgIiIi DQorICAgICAgICBvdXQgPSBzZWxmLl9fc2VuZF9leHBlY3QoImlwIC1mYW1pbHkgaW5ldCBhZGRy ZXNzIHNob3cgZGV2ICVzIHwgYXdrICcvaW5ldC8geyBwcmludCAkMiB9JyINCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAlIGludGYsICIjICIpDQorICAgICAgICByZXR1cm4gb3V0 LnNwbGl0KCcvJylbMF0NCisNCisgICAgZGVmIGdldF9pcHY0X2FkZHJfZnJlZWJzZChzZWxmLCBp bnRmLCBkcml2ZXIpOg0KKyAgICAgICAgIiIiDQorICAgICAgICBHZXQgaXB2NCBhZGRyZXNzIG9m IHNwZWNpZmllZCBwY2kgZGV2aWNlIG9uIEZyZWVic2QuDQorICAgICAgICAiIiINCisgICAgICAg IHRyeToNCisgICAgICAgICAgICBnZXRfaXB2NF9hZGRyX2ZyZWVic2QgPSBnZXRhdHRyKA0KKyAg ICAgICAgICAgICAgICBzZWxmLA0KKyAgICAgICAgICAgICAgICAnZ2V0X2lwdjRfYWRkcl9mcmVl YnNkXyVzJyAlDQorICAgICAgICAgICAgICAgIGRyaXZlcikNCisgICAgICAgIGV4Y2VwdCBFeGNl cHRpb24gYXMgZToNCisgICAgICAgICAgICBnZW5lcmljX2RyaXZlciA9ICdnZW5lcmljJw0KKyAg ICAgICAgICAgIGdldF9pcHY0X2FkZHJfZnJlZWJzZCA9IGdldGF0dHIoDQorICAgICAgICAgICAg ICAgIHNlbGYsDQorICAgICAgICAgICAgICAgICdnZXRfaXB2NF9hZGRyX2ZyZWVic2RfJXMnICUN CisgICAgICAgICAgICAgICAgZ2VuZXJpY19kcml2ZXIpDQorDQorICAgICAgICByZXR1cm4gZ2V0 X2lwdjRfYWRkcl9mcmVlYnNkKGludGYsIGJ1c19pZCwgZGV2ZnVuX2lkKQ0KKw0KKyAgICBkZWYg Z2V0X2lwdjRfYWRkcl9mcmVlYnNkX2dlbmVyaWMoc2VsZiwgaW50Zik6DQorICAgICAgICAiIiIN CisgICAgICAgIEdldCB0aGUgSVB2NCBhZGRyZXNzIGJ5IHRoZSBkZWZhdWx0IHdheSBvbiBGcmVl YnNkLg0KKyAgICAgICAgIiIiDQorICAgICAgICBvdXQgPSBzZWxmLl9fc2VuZF9leHBlY3QoJ2lm Y29uZmlnICVzJyAlIGludGYsICcjICcpDQorICAgICAgICByZXhwID0gciJpbmV0IChbXGQ6XSop JSINCisgICAgICAgIHBhdHRlcm4gPSByZS5jb21waWxlKHJleHApDQorICAgICAgICBtYXRjaCA9 IHBhdHRlcm4uZmluZGFsbChvdXQpDQorICAgICAgICBpZiBsZW4obWF0Y2gpID09IDA6DQorICAg ICAgICAgICAgcmV0dXJuIE5vbmUNCisNCisgICAgICAgIHJldHVybiBtYXRjaFswXQ0KKw0KKyAg ICBAbmljX2hhc19kcml2ZXINCisgICAgZGVmIGdldF9pcHY2X2FkZHIoc2VsZik6DQorICAgICAg ICAiIiINCisgICAgICAgIEdldCBpcHY2IGFkZHJlc3Mgb2Ygc3BlY2lmaWVkIHBjaSBkZXZpY2Uu DQorICAgICAgICAiIiINCisgICAgICAgIGdldF9pcHY2X2FkZHIgPSBnZXRhdHRyKA0KKyAgICAg ICAgICAgIHNlbGYsICdnZXRfaXB2Nl9hZGRyXyVzJyAlIHNlbGYuX19nZXRfb3NfdHlwZSgpKQ0K KyAgICAgICAgcmV0dXJuIGdldF9pcHY2X2FkZHIoc2VsZi5pbnRmX25hbWUsIHNlbGYuY3VycmVu dF9kcml2ZXIpDQorDQorICAgIGRlZiBnZXRfaXB2Nl9hZGRyX2xpbnV4KHNlbGYsIGludGYsIGRy aXZlcik6DQorICAgICAgICAiIiINCisgICAgICAgIEdldCBpcHY2IGFkZHJlc3Mgb2Ygc3BlY2lm aWVkIHBjaSBkZXZpY2Ugb24gbGludXguDQorICAgICAgICAiIiINCisgICAgICAgIHRyeToNCisg ICAgICAgICAgICBnZXRfaXB2Nl9hZGRyX2xpbnV4ID0gZ2V0YXR0cigNCisgICAgICAgICAgICAg ICAgc2VsZiwNCisgICAgICAgICAgICAgICAgJ2dldF9pcHY2X2FkZHJfbGludXhfJXMnICUNCisg ICAgICAgICAgICAgICAgZHJpdmVyKQ0KKyAgICAgICAgZXhjZXB0IEV4Y2VwdGlvbiBhcyBlOg0K KyAgICAgICAgICAgIGdlbmVyaWNfZHJpdmVyID0gJ2dlbmVyaWMnDQorICAgICAgICAgICAgZ2V0 X2lwdjZfYWRkcl9saW51eCA9IGdldGF0dHIoDQorICAgICAgICAgICAgICAgIHNlbGYsDQorICAg ICAgICAgICAgICAgICdnZXRfaXB2Nl9hZGRyX2xpbnV4XyVzJyAlDQorICAgICAgICAgICAgICAg IGdlbmVyaWNfZHJpdmVyKQ0KKw0KKyAgICAgICAgcmV0dXJuIGdldF9pcHY2X2FkZHJfbGludXgo aW50ZikNCisNCisgICAgZGVmIGdldF9pcHY2X2FkZHJfbGludXhfZ2VuZXJpYyhzZWxmLCBpbnRm KToNCisgICAgICAgICIiIg0KKyAgICAgICAgR2V0IHRoZSBJUHY2IGFkZHJlc3MgYnkgdGhlIGRl ZmF1bHQgd2F5IG9uIGxpbnV4Lg0KKyAgICAgICAgIiIiDQorICAgICAgICBvdXQgPSBzZWxmLl9f c2VuZF9leHBlY3QoImlwIC1mYW1pbHkgaW5ldDYgYWRkcmVzcyBzaG93IGRldiAlcyB8IGF3ayAn L2luZXQ2LyB7IHByaW50ICQyIH0nIg0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICUgaW50ZiwgIiMgIikNCisgICAgICAgIHJldHVybiBvdXQuc3BsaXQoJy8nKVswXQ0KKw0KKyAg ICBkZWYgZ2V0X2lwdjZfYWRkcl9mcmVlYnNkKHNlbGYsIGludGYsIGRyaXZlcik6DQorICAgICAg ICAiIiINCisgICAgICAgIEdldCBpcHY2IGFkZHJlc3Mgb2Ygc3BlY2lmaWVkIHBjaSBkZXZpY2Ug b24gRnJlZWJzZC4NCisgICAgICAgICIiIg0KKyAgICAgICAgdHJ5Og0KKyAgICAgICAgICAgIGdl dF9pcHY2X2FkZHJfZnJlZWJzZCA9IGdldGF0dHIoDQorICAgICAgICAgICAgICAgIHNlbGYsDQor ICAgICAgICAgICAgICAgICdnZXRfaXB2Nl9hZGRyX2ZyZWVic2RfJXMnICUNCisgICAgICAgICAg ICAgICAgZHJpdmVyKQ0KKyAgICAgICAgZXhjZXB0IEV4Y2VwdGlvbiBhcyBlOg0KKyAgICAgICAg ICAgIGdlbmVyaWNfZHJpdmVyID0gJ2dlbmVyaWMnDQorICAgICAgICAgICAgZ2V0X2lwdjZfYWRk cl9mcmVlYnNkID0gZ2V0YXR0cigNCisgICAgICAgICAgICAgICAgc2VsZiwNCisgICAgICAgICAg ICAgICAgJ2dldF9pcHY2X2FkZHJfZnJlZWJzZF8lcycgJQ0KKyAgICAgICAgICAgICAgICBnZW5l cmljX2RyaXZlcikNCisNCisgICAgICAgIHJldHVybiBnZXRfaXB2Nl9hZGRyX2ZyZWVic2QoaW50 ZikNCisNCisgICAgZGVmIGdldF9pcHY2X2FkZHJfZnJlZWJzZF9nZW5lcmljKHNlbGYsIGludGYp Og0KKyAgICAgICAgIiIiDQorICAgICAgICBHZXQgdGhlIElQdjYgYWRkcmVzcyBieSB0aGUgZGVm YXVsdCB3YXkgb24gRnJlZWJzZC4NCisgICAgICAgICIiIg0KKyAgICAgICAgb3V0ID0gc2VsZi5f X3NlbmRfZXhwZWN0KCdpZmNvbmZpZyAlcycgJSBpbnRmLCAnIyAnKQ0KKyAgICAgICAgcmV4cCA9 IHIiaW5ldDYgKFtcZGEtZjpdKiklIg0KKyAgICAgICAgcGF0dGVybiA9IHJlLmNvbXBpbGUocmV4 cCkNCisgICAgICAgIG1hdGNoID0gcGF0dGVybi5maW5kYWxsKG91dCkNCisgICAgICAgIGlmIGxl bihtYXRjaCkgPT0gMDoNCisgICAgICAgICAgICByZXR1cm4gTm9uZQ0KKw0KKyAgICAgICAgcmV0 dXJuIG1hdGNoWzBdDQorDQorICAgIGRlZiBnZXRfbmljX251bWEoc2VsZik6DQorICAgICAgICAi IiINCisgICAgICAgIEdldCBudW1hIG51bWJlciBvZiBzcGVjaWZpZWQgcGNpIGRldmljZS4NCisg ICAgICAgICIiIg0KKyAgICAgICAgc2VsZi5jcmIuZ2V0X25pY19udW1hKHNlbGYuYnVzX2lkLCBz ZWxmLmRldmZ1bl9pZCkNCisNCisgICAgZGVmIGdldF9jYXJkX3R5cGUoc2VsZik6DQorICAgICAg ICAiIiINCisgICAgICAgIEdldCBjYXJkIHR5cGUgb2Ygc3BlY2lmaWVkIHBjaSBkZXZpY2UuDQor ICAgICAgICAiIiINCisgICAgICAgIHJldHVybiBzZWxmLmNy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nZXRhdHRyKA0KKyAgICAgICAgICAgICAgICBzZWxmLA0KKyAgICAgICAgICAg ICAgICAnZ2V0X3NyaW92X3Zmc19wY2lfbGludXhfJXMnICUNCisgICAgICAgICAgICAgICAgZ2Vu ZXJpY19kcml2ZXIpDQorDQorICAgICAgICByZXR1cm4gZ2V0X3NyaW92X3Zmc19wY2lfbGludXgo YnVzX2lkLCBkZXZmdW5faWQpDQorDQorICAgIGRlZiBnZXRfc3Jpb3ZfdmZzX3BjaV9saW51eF9n ZW5lcmljKHNlbGYsIGJ1c19pZCwgZGV2ZnVuX2lkKToNCisgICAgICAgICIiIg0KKyAgICAgICAg R2V0IGFsbCB0aGUgVkYgUENJcyBvZiBzcGVjaWZpZWQgUEYgYnkgdGhlIGRlZmF1bHQgd2F5IG9u IGxpbnV4Lg0KKyAgICAgICAgIiIiDQorICAgICAgICBzcmlvdl9udW12ZnMgPSBzZWxmLl9fc2Vu ZF9leHBlY3QoDQorICAgICAgICAgICAgImNhdCAvc3lzL2J1cy9wY2kvZGV2aWNlcy8wMDAwXDol c1w6JXMvc3Jpb3ZfbnVtdmZzIiAlDQorICAgICAgICAgICAgKGJ1c19pZCwgZGV2ZnVuX2lkKSwg IiMgIikNCisgICAgICAgIHNyaW92X3Zmc19wY2kgPSBbXQ0KKyAgICAgICAgaWYgaW50KHNyaW92 X251bXZmcykgPT0gMDoNCisgICAgICAgICAgICBwYXNzDQorICAgICAgICBlbHNlOg0KKyAgICAg ICAgICAgIHRyeToNCisgICAgICAgICAgICAgICAgdmlydGZucyA9IHNlbGYuX19zZW5kX2V4cGVj dCgNCisgICAgICAgICAgICAgICAgICAgICJscyAtZCAvc3lzL2J1cy9wY2kvZGV2aWNlcy8wMDAw XDolc1w6JXMvdmlydGZuKiIgJQ0KKyAgICAgICAgICAgICAgICAgICAgKGJ1c19pZCwgZGV2ZnVu X2lkKSwgIiMgIikNCisgICAgICAgICAgICAgICAgZm9yIHZpcnRmbiBpbiB2aXJ0Zm5zLnNwbGl0 KCk6DQorICAgICAgICAgICAgICAgICAgICB2Zl91ZXZlbnQgPSBzZWxmLl9fc2VuZF9leHBlY3Qo DQorICAgICAgICAgICAgICAgICAgICAgICAgImNhdCAlcyIgJQ0KKyAgICAgICAgICAgICAgICAg ICAgICAgIG9zLnBhdGguam9pbih2aXJ0Zm4sICJ1ZXZlbnQiKSwgIiMgIikNCisgICAgICAgICAg ICAgICAgICAgIHZmX3BjaSA9IHJlLnNlYXJjaCgNCisgICAgICAgICAgICAgICAgICAgICAgICBy IlBDSV9TTE9UX05BTUU9MDAwMDooWzAtOWEtZl0rOlswLTlhLWZdK1wuWzAtOWEtZl0rKSIsDQor ICAgICAgICAgICAgICAgICAgICAgICAgdmZfdWV2ZW50KS5ncm91cCgxKQ0KKyAgICAgICAgICAg ICAgICAgICAgc3Jpb3ZfdmZzX3BjaS5hcHBlbmQodmZfcGNpKQ0KKyAgICAgICAgICAgIGV4Y2Vw dCBFeGNlcHRpb24gYXMgZToNCisgICAgICAgICAgICAgICAgcHJpbnQgIlNjYW4gbGludXggcG9y dCBbMDAwMDolcy4lc10gc3Jpb3YgdmYgZmFpbGVkOiAlcyIgJSAoYnVzX2lkLCBkZXZmdW5faWQs IGUpDQorDQorICAgICAgICByZXR1cm4gc3Jpb3ZfdmZzX3BjaQ0KKw0KKyAgICBAbmljX2hhc19k cml2ZXINCisgICAgZGVmIGdlbmVyYXRlX3NyaW92X3ZmcyhzZWxmLCB2Zl9udW0pOg0KKyAgICAg ICAgIiIiDQorICAgICAgICBHZW5lcmF0ZSBzb21lIG51bWJlcnMgb2YgU1JJT1YgVkYuDQorICAg ICAgICAiIiINCisgICAgICAgIGlmIHZmX251bSA9PSAwOg0KKyAgICAgICAgICAgIHNlbGYuYmlu ZF92Zl9kcml2ZXIoKQ0KKyAgICAgICAgZ2VuZXJhdGVfc3Jpb3ZfdmZzID0gZ2V0YXR0cigNCisg ICAgICAgICAgICBzZWxmLCAnZ2VuZXJhdGVfc3Jpb3ZfdmZzXyVzJyAlDQorICAgICAgICAgICAg c2VsZi5fX2dldF9vc190eXBlKCkpDQorICAgICAgICBnZW5lcmF0ZV9zcmlvdl92ZnMoDQorICAg ICAgICAgICAgc2VsZi5idXNfaWQsDQorICAgICAgICAgICAgc2VsZi5kZXZmdW5faWQsDQorICAg ICAgICAgICAgdmZfbnVtLA0KKyAgICAgICAgICAgIHNlbGYuY3VycmVudF9kcml2ZXIpDQorICAg ICAgICBpZiB2Zl9udW0gIT0gMDoNCisgICAgICAgICAgICBzZWxmLnNyaW92X3Zmc19wY2kgPSBz ZWxmLmdldF9zcmlvdl92ZnNfcGNpKCkNCisNCisgICAgICAgICAgICB2Zl9wY2kgPSBzZWxmLnNy aW92X3Zmc19wY2lbMF0NCisgICAgICAgICAgICBhZGRyX2FycmF5ID0gdmZfcGNpLnNwbGl0KCc6 JykNCisgICAgICAgICAgICBidXNfaWQgPSBhZGRyX2FycmF5WzBdDQorICAgICAgICAgICAgZGV2 ZnVuX2lkID0gYWRkcl9hcnJheVsxXQ0KKw0KKyAgICAgICAgICAgIHNlbGYuZGVmYXVsdF92Zl9k cml2ZXIgPSBzZWxmLmNyYi5nZXRfcGNpX2Rldl9kcml2ZXIoDQorICAgICAgICAgICAgICAgIGJ1 c19pZCwgZGV2ZnVuX2lkKQ0KKyAgICAgICAgZWxzZToNCisgICAgICAgICAgICBzZWxmLnNyaW92 X3Zmc19wY2kgPSBbXQ0KKyAgICAgICAgdGltZS5zbGVlcCgxKQ0KKw0KKyAgICBkZWYgZ2VuZXJh dGVfc3Jpb3ZfdmZzX2xpbnV4KHNlbGYsIGJ1c19pZCwgZGV2ZnVuX2lkLCB2Zl9udW0sIGRyaXZl cik6DQorICAgICAgICAiIiINCisgICAgICAgIEdlbmVyYXRlIHNvbWUgbnVtYmVycyBvZiBTUklP ViBWRi4NCisgICAgICAgICIiIg0KKyAgICAgICAgdHJ5Og0KKyAgICAgICAgICAgIGdlbmVyYXRl X3NyaW92X3Zmc19saW51eCA9IGdldGF0dHIoDQorICAgICAgICAgICAgICAgIHNlbGYsDQorICAg ICAgICAgICAgICAgICdnZW5lcmF0ZV9zcmlvdl92ZnNfbGludXhfJXMnICUNCisgICAgICAgICAg ICAgICAgZHJpdmVyKQ0KKyAgICAgICAgZXhjZXB0IEV4Y2VwdGlvbiBhcyBlOg0KKyAgICAgICAg ICAgIGdlbmVyaWNfZHJpdmVyID0gJ2dlbmVyaWMnDQorICAgICAgICAgICAgZ2VuZXJhdGVfc3Jp b3ZfdmZzX2xpbnV4ID0gZ2V0YXR0cigNCisgICAgICAgICAgICAgICAgc2VsZiwNCisgICAgICAg ICAgICAgICAgJ2dlbmVyYXRlX3NyaW92X3Zmc19saW51eF8lcycgJQ0KKyAgICAgICAgICAgICAg ICBnZW5lcmljX2RyaXZlcikNCisNCisgICAgICAgIHJldHVybiBnZW5lcmF0ZV9zcmlvdl92ZnNf bGludXgoYnVzX2lkLCBkZXZmdW5faWQsIHZmX251bSkNCisNCisgICAgZGVmIGdlbmVyYXRlX3Ny aW92X3Zmc19saW51eF9nZW5lcmljKHNlbGYsIGJ1c19pZCwgZGV2ZnVuX2lkLCB2Zl9udW0pOg0K KyAgICAgICAgIiIiDQorICAgICAgICBHZW5lcmF0ZSBTUklPViBWRnMgYnkgdGhlIGRlZmF1bHQg d2F5IG9uIGxpbnV4Lg0KKyAgICAgICAgIiIiDQorICAgICAgICBuaWNfZHJpdmVyID0gc2VsZi5n ZXRfbmljX2RyaXZlcigpDQorDQorICAgICAgICBpZiBub3QgbmljX2RyaXZlcjoNCisgICAgICAg ICAgICByZXR1cm4gTm9uZQ0KKw0KKyAgICAgICAgdmZfcmVnX2ZpbGUgPSAic3Jpb3ZfbnVtdmZz Ig0KKyAgICAgICAgdmZfcmVnX3BhdGggPSBvcy5wYXRoLmpvaW4oIi9zeXMvYnVzL3BjaS9kZXZp Y2VzLzAwMDA6JXM6JXMiICUNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChi dXNfaWQsIGRldmZ1bl9pZCksIHZmX3JlZ19maWxlKQ0KKyAgICAgICAgc2VsZi5fX3NlbmRfZXhw ZWN0KCJlY2hvICVkID4gJXMiICUNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoaW50KHZm X251bSksIHZmX3JlZ19wYXRoKSwgIiMgIikNCisNCisgICAgZGVmIGdlbmVyYXRlX3NyaW92X3Zm c19saW51eF9pZ2JfdWlvKHNlbGYsIGJ1c19pZCwgZGV2ZnVuX2lkLCB2Zl9udW0pOg0KKyAgICAg ICAgIiIiDQorICAgICAgICBHZW5lcmF0ZSBTUklPViBWRnMgYnkgdGhlIHNwZWNpYWwgd2F5IG9m IGlnYl91aW8gZHJpdmVyIG9uIGxpbnV4Lg0KKyAgICAgICAgIiIiDQorICAgICAgICBuaWNfZHJp dmVyID0gc2VsZi5nZXRfbmljX2RyaXZlcigpDQorDQorICAgICAgICBpZiBub3QgbmljX2RyaXZl cjoNCisgICAgICAgICAgICByZXR1cm4gTm9uZQ0KKw0KKyAgICAgICAgdmZfcmVnX2ZpbGUgPSAi bWF4X3ZmcyINCisgICAgICAgIHZmX3JlZ19wYXRoID0gb3MucGF0aC5qb2luKCIvc3lzL2J1cy9w Y2kvZGV2aWNlcy8wMDAwOiVzOiVzIiAlDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoYnVzX2lkLCBkZXZmdW5faWQpLCB2Zl9yZWdfZmlsZSkNCisgICAgICAgIHNlbGYuX19z ZW5kX2V4cGVjdCgiZWNobyAlZCA+ICVzIiAlDQorICAgICAgICAgICAgICAgICAgICAgICAgICAg KGludCh2Zl9udW0pLCB2Zl9yZWdfcGF0aCksICIjICIpDQorDQorICAgIGRlZiBkZXN0cm95X3Ny aW92X3ZmcyhzZWxmKToNCisgICAgICAgICIiIg0KKyAgICAgICAgRGVzdHJveSB0aGUgU1JJT1Yg VkZzLg0KKyAgICAgICAgIiIiDQorICAgICAgICBzZWxmLmdlbmVyYXRlX3NyaW92X3ZmcygwKQ0K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ICAgZWxzZToNCisgICAgICAgICAg ICBhZGRyX2FycmF5ID0gcGNpLnNwbGl0KCc6JykNCisgICAgICAgICAgICBidXNfaWQgPSBhZGRy X2FycmF5WzBdDQorICAgICAgICAgICAgZGV2ZnVuX2lkID0gYWRkcl9hcnJheVsxXQ0KKw0KKyAg ICAgICAgICAgIGJpbmRfdmZfZHJpdmVyKGJ1c19pZCwgZGV2ZnVuX2lkLCBkcml2ZXIpDQorDQor ICAgIGRlZiBiaW5kX2RyaXZlcihzZWxmLCBkcml2ZXI9JycpOg0KKyAgICAgICAgIiIiDQorICAg ICAgICBCaW5kIHNwZWNpZmllZCBkcml2ZXIgdG8gUEYuDQorICAgICAgICAiIiINCisgICAgICAg IGJpbmRfZHJpdmVyID0gZ2V0YXR0cihzZWxmLCAnYmluZF9kcml2ZXJfJXMnICUgc2VsZi5fX2dl dF9vc190eXBlKCkpDQorICAgICAgICBpZiBub3QgZHJpdmVyOg0KKyAgICAgICAgICAgIGlmIG5v dCBzZWxmLmRlZmF1bHRfZHJpdmVyOg0KKyAgICAgICAgICAgICAgICBwcmludCAiTXVzdCBzcGVj aWZ5IGEgZHJpdmVyIGJlY2F1c2UgZGVmYXVsdCBkcml2ZXIgaXMgTlVMTCEiDQorICAgICAgICAg ICAgICAgIHJldHVybg0KKyAgICAgICAgICAgIGRyaXZlciA9IHNlbGYuZGVmYXVsdF9kcml2ZXIN CisgICAgICAgIHJldCA9IGJpbmRfZHJpdmVyKHNlbGYuYnVzX2lkLCBzZWxmLmRldmZ1bl9pZCwg ZHJpdmVyKQ0KKyAgICAgICAgdGltZS5zbGVlcCgxKQ0KKyAgICAgICAgcmV0dXJuIHJldA0KKw0K KyAgICBkZWYgYmluZF9kcml2ZXJfbGludXgoc2VsZiwgYnVzX2lkLCBkZXZmdW5faWQsIGRyaXZl cik6DQorICAgICAgICAiIiINCisgICAgICAgIEJpbmQgTklDIHBvcnQgdG8gc3BlY2lmaWVkIGRy aXZlciBvbiBsaW51eC4NCisgICAgICAgICIiIg0KKyAgICAgICAgZHJpdmVyX2FsaWFzID0gZHJp dmVyLnJlcGxhY2UoJy0nLCAnXycpDQorICAgICAgICB0cnk6DQorICAgICAgICAgICAgYmluZF9k cml2ZXJfbGludXggPSBnZXRhdHRyKA0KKyAgICAgICAgICAgICAgICBzZWxmLA0KKyAgICAgICAg ICAgICAgICAnYmluZF9kcml2ZXJfbGludXhfJXMnICUNCisgICAgICAgICAgICAgICAgZHJpdmVy X2FsaWFzKQ0KKyAgICAgICAgICAgIHJldHVybiBiaW5kX2RyaXZlcl9saW51eChidXNfaWQsIGRl dmZ1bl9pZCkNCisgICAgICAgIGV4Y2VwdCBFeGNlcHRpb24gYXMgZToNCisgICAgICAgICAgICBk cml2ZXJfYWxpYXMgPSAnZ2VuZXJpYycNCisgICAgICAgICAgICBiaW5kX2RyaXZlcl9saW51eCA9 IGdldGF0dHIoDQorICAgICAgICAgICAgICAgIHNlbGYsDQorICAgICAgICAgICAgICAgICdiaW5k X2RyaXZlcl9saW51eF8lcycgJQ0KKyAgICAgICAgICAgICAgICBkcml2ZXJfYWxpYXMpDQorICAg ICAgICAgICAgcmV0dXJuIGJpbmRfZHJpdmVyX2xpbnV4KGJ1c19pZCwgZGV2ZnVuX2lkLCBkcml2 ZXIpDQorDQorICAgIGRlZiBiaW5kX2RyaXZlcl9saW51eF9nZW5lcmljKHNlbGYsIGJ1c19pZCwg ZGV2ZnVuX2lkLCBkcml2ZXIpOg0KKyAgICAgICAgIiIiDQorICAgICAgICBCaW5kIE5JQyBwb3J0 IHRvIHNwZWNpZmllZCBkcml2ZXIgYnkgdGhlIGRlZmF1bHQgd2F5IG9uIGxpbnV4Lg0KKyAgICAg ICAgIiIiDQorICAgICAgICBuaWNfcGNpX251bSA9ICc6Jy5qb2luKFsnMDAwMCcsIGJ1c19pZCwg ZGV2ZnVuX2lkXSkNCisgICAgICAgIHNlbGYuX19zZW5kX2V4cGVjdCgNCisgICAgICAgICAgICAi ZWNobyAlcyA+IC9zeXMvYnVzL3BjaS9kZXZpY2VzLzAwMDBcOiVzXDolcy9kcml2ZXIvdW5iaW5k IiAlDQorICAgICAgICAgICAgKG5pY19wY2lfbnVtLCBidXNfaWQsIGRldmZ1bl9pZCksICIjICIp DQorICAgICAgICBzZWxmLl9fc2VuZF9leHBlY3QoDQorICAgICAgICAgICAgImVjaG8gJXMgPiAv c3lzL2J1cy9wY2kvZHJpdmVycy8lcy9iaW5kIiAlDQorICAgICAgICAgICAgKG5pY19wY2lfbnVt LCBkcml2ZXIpLCAiIyAiKQ0KKw0KKyAgICBkZWYgYmluZF9kcml2ZXJfbGludXhfcGNpX3N0dWIo c2VsZiwgYnVzX2lkLCBkZXZmdW5faWQpOg0KKyAgICAgICAgIiIiDQorICAgICAgICBCaW5kIE5J QyBwb3J0IHRvIHRoZSBwY2ktc3R1YiBkcml2ZXIgb24gbGludXguDQorICAgICAgICAiIiINCisg ICAgICAgIG5pY19wY2lfbnVtID0gJzonLmpvaW4oWycwMDAwJywgYnVzX2lkLCBkZXZmdW5faWRd KQ0KKyAgICAgICAgcGNpX2lkID0gc2VsZi5nZXRfY2FyZF90eXBlKCkNCisgICAgICAgIHNlbGYu X19zZW5kX2V4cGVjdCgNCisgICAgICAgICAgICAiZWNobyAlcyA+IC9zeXMvYnVzL3BjaS9kcml2 ZXJzL3BjaS1zdHViL25ld19pZCIgJQ0KKyAgICAgICAgICAgIG5pY19wY2lfbnVtLCAiIyAiKQ0K KyAgICAgICAgc2VsZi5fX3NlbmRfZXhwZWN0KA0KKyAgICAgICAgICAgICJlY2hvICVzID4gL3N5 cy9idXMvcGNpL2RldmljZXMvMDAwMFw6JXNcOiVzL2RyaXZlci91bmJpbmQiICUNCisgICAgICAg ICAgICAobmljX3BjaV9udW0sIGJ1c19pZCwgZGV2ZnVuX2lkKSwgIiMgIikNCisgICAgICAgIHNl bGYuX19zZW5kX2V4cGVjdCgNCisgICAgICAgICAgICAiZWNobyAlcyA+IC9zeXMvYnVzL3BjaS9k cml2ZXJzL3BjaS1zdHViL2JpbmQiICUNCisgICAgICAgICAgICBuaWNfcGNpX251bSwgIiMgIikN CisNCisgICAgQG5pY19oYXNfZHJpdmVyDQorICAgIGRlZiB1bmJpbmRfZHJpdmVyKHNlbGYsIGRy aXZlcj0nJyk6DQorICAgICAgICAiIiINCisgICAgICAgIFVuYmluZCBkcml2ZXIuDQorICAgICAg ICAiIiINCisgICAgICAgIHVuYmluZF9kcml2ZXIgPSBnZXRhdHRyKA0KKyAgICAgICAgICAgIHNl bGYsICd1bmJpbmRfZHJpdmVyXyVzJyAlDQorICAgICAgICAgICAgc2VsZi5fX2dldF9vc190eXBl KCkpDQorICAgICAgICBpZiBub3QgZHJpdmVyOg0KKyAgICAgICAgICAgIGRyaXZlciA9ICdnZW5l cmljJw0KKyAgICAgICAgcmV0ID0gdW5iaW5kX2RyaXZlcihzZWxmLmJ1c19pZCwgc2VsZi5kZXZm dW5faWQsIGRyaXZlcikNCisgICAgICAgIHRpbWUuc2xlZXAoMSkNCisgICAgICAgIHJldHVybiBy ZXQNCisNCisgICAgZGVmIHVuYmluZF9kcml2ZXJfbGludXgoc2VsZiwgYnVzX2lkLCBkZXZmdW5f aWQsIGRyaXZlcik6DQorICAgICAgICAiIiINCisgICAgICAgIFVuYmluZCBkcml2ZXIgb24gbGlu dXguDQorICAgICAgICAiIiINCisgICAgICAgIGRyaXZlcl9hbGlhcyA9IGRyaXZlci5yZXBsYWNl KCctJywgJ18nKQ0KKw0KKyAgICAgICAgdW5iaW5kX2RyaXZlcl9saW51eCA9IGdldGF0dHIoDQor ICAgICAgICAgICAgc2VsZiwgJ3VuYmluZF9kcml2ZXJfbGludXhfJXMnICUgZHJpdmVyX2FsaWFz KQ0KKyAgICAgICAgcmV0dXJuIHVuYmluZF9kcml2ZXJfbGludXgoYnVzX2lkLCBkZXZmdW5faWQp DQorDQorICAgIGRlZiB1bmJpbmRfZHJpdmVyX2xpbnV4X2dlbmVyaWMoc2VsZiwgYnVzX2lkLCBk ZX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ICBkZWYgZ2V0X3BjaShzZWxmLCBsb2NhbFBvcnQpOg0K ICAgICAgICAgIiIiDQpAQCAtMTYzLDYgKzE2NSw5IEBAIGNsYXNzIFRlc3RlcihDcmIpOg0KICAg ICAgICAgIiIiDQogICAgICAgICBSZXR1cm4gdGVzdGVyIGxvY2FsIHBvcnQgaW50ZXJmYWNlIG5h bWUuDQogICAgICAgICAiIiINCisgICAgICAgIGlmICdpbnRmJyBub3QgaW4gc2VsZi5wb3J0c19p bmZvW2xvY2FsUG9ydF06DQorICAgICAgICAgICAgcmV0dXJuICdOL0EnDQorDQogICAgICAgICBy ZXR1cm4gc2VsZi5wb3J0c19pbmZvW2xvY2FsUG9ydF1bJ2ludGYnXQ0KIA0KICAgICBkZWYgZ2V0 X21hYyhzZWxmLCBsb2NhbFBvcnQpOg0KQEAgLTIwMiwyNiArMjA3LDUxIEBAIGNsYXNzIFRlc3Rl cihDcmIpOg0KICAgICAgICAgdHJ5Og0KICAgICAgICAgICAgIGZvciAocGNpX2J1cywgcGNpX2lk KSBpbiBzZWxmLnBjaV9kZXZpY2VzX2luZm86DQogICAgICAgICAgICAgICAgIGFkZHJfYXJyYXkg PSBwY2lfYnVzLnNwbGl0KCc6JykNCi0gICAgICAgICAgICAgICAgaXRmID0gc2VsZi5nZXRfaW50 ZXJmYWNlX25hbWUoYWRkcl9hcnJheVswXSwgYWRkcl9hcnJheVsxXSkNCisgICAgICAgICAgICAg ICAgcG9ydCA9IE5ldERldmljZShzZWxmLCBhZGRyX2FycmF5WzBdLCBhZGRyX2FycmF5WzFdKQ0K KyAgICAgICAgICAgICAgICBpdGYgPSBwb3J0LmdldF9pbnRlcmZhY2VfbmFtZSgpDQorICAgICAg ICAgICAgICAgIHNlbGYuZW5hYmxlX2lwdjYoaXRmKQ0KICAgICAgICAgICAgICAgICBzZWxmLnNl bmRfZXhwZWN0KCJpZmNvbmZpZyAlcyB1cCIgJSBpdGYsICIjICIpDQogDQogICAgICAgICBleGNl cHQgRXhjZXB0aW9uIGFzIGU6DQogICAgICAgICAgICAgc2VsZi5sb2dnZXIuZXJyb3IoIiAgICEh ISBSZXN0b3JlIElURjogIiArIGUubWVzc2FnZSkNCiANCisgICAgICAgIHNsZWVwKDIpDQorDQor ICAgIGRlZiBsb2FkX3NlcmlhbGl6ZXJfcG9ydHMoc2VsZik6DQorICAgICAgICBzZWxmLnBvcnRz X2luZm8gPSBbXQ0KKyAgICAgICAgY2FjaGVkX3BvcnRzX2luZm8gPSBzZWxmLnNlcmlhbGl6ZXIu bG9hZChzZWxmLlBPUlRfSU5GT19DQUNIRV9LRVkpDQorICAgICAgICBpZiBjYWNoZWRfcG9ydHNf aW5mbyBpcyBOb25lOg0KKyAgICAgICAgICAgIHJldHVybg0KKw0KKyAgICAgICAgIyBub3cgbm90 IHNhdmUgbmV0ZGV2IG9iamVjdCwgd2lsbCBpbXBsZW1lbnRlZCBsYXRlcg0KKyAgICAgICAgc2Vs Zi5wb3J0c19pbmZvID0gY2FjaGVkX3BvcnRzX2luZm8NCisNCisgICAgZGVmIHNhdmVfc2VyaWFs aXplcl9wb3J0cyhzZWxmKToNCisgICAgICAgIGNhY2hlZF9wb3J0c19pbmZvID0gW10NCisgICAg ICAgIGZvciBwb3J0IGluIHNlbGYucG9ydHNfaW5mbzoNCisgICAgICAgICAgICBwb3J0X2luZm8g PSB7fQ0KKyAgICAgICAgICAgIGZvciBrZXkgaW4gcG9ydC5rZXlzKCk6DQorICAgICAgICAgICAg ICAgIGlmIHR5cGUocG9ydFtrZXldKSBpcyBzdHI6DQorICAgICAgICAgICAgICAgICAgICBwb3J0 X2luZm9ba2V5XSA9IHBvcnRba2V5XQ0KKyAgICAgICAgICAgICAgICAjIG5lZWQgc2F2ZSBuZXRk ZXYgb2JqZWN0cw0KKyAgICAgICAgICAgIGNhY2hlZF9wb3J0c19pbmZvLmFwcGVuZChwb3J0X2lu Zm8pDQorICAgICAgICBzZWxmLnNlcmlhbGl6ZXIuc2F2ZShzZWxmLlBPUlRfSU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c19pbmZvLmFw cGVuZCh7J3BjaSc6IHBjaV9idXMsDQorICAgICAgICAgICAgc2VsZi5wb3J0c19pbmZvLmFwcGVu ZCh7J3BvcnQnOiBwb3J0LA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdw Y2knOiBwY2lfYnVzLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0eXBl JzogcGNpX2lkLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdpbnRmJzog aW50ZiwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbWFjJzogbWFjYWRk cn0pDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hYyc6IG1hY2FkZHIs DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2lwdjYnOiBpcHY2fSkNCiAN CiAgICAgZGVmIHNlbmRfcGluZzYoc2VsZiwgbG9jYWxQb3J0LCBpcHY2LCBtYWMpOg0KICAgICAg ICAgIiIiDQotLSANCjEuOS4wDQoNCg==