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 C5E66A00E6 for ; Mon, 15 Apr 2019 17:45:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6AA5A1B2AE; Mon, 15 Apr 2019 17:45:05 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00084.outbound.protection.outlook.com [40.107.0.84]) by dpdk.org (Postfix) with ESMTP id 8C9C01B29A for ; Mon, 15 Apr 2019 17:45:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fCx8tDjO5S4u9ArPhoQBgftiy1mv/6Jc1fM6T5FtgnQ=; b=oOCvG2bRdz/wY7YMdWtmeBMtMDT0w90ld0Y9SmzifaagnqZ1WKVad07m8ebgu07Jf17ylVoh7/URkeyvhsvaophnxdL9zPB+U3yXTx7THSEtt1MqCMyN3qqRMGdS2yrP1qqiMlk1iuFTE03YZmMs7ZrUh7JVZuKWFfq3igLOkng= Received: from DB7PR08MB3385.eurprd08.prod.outlook.com (20.176.238.90) by DB7PR08MB3594.eurprd08.prod.outlook.com (20.177.120.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.14; Mon, 15 Apr 2019 15:45:03 +0000 Received: from DB7PR08MB3385.eurprd08.prod.outlook.com ([fe80::b539:4693:e75b:c1e3]) by DB7PR08MB3385.eurprd08.prod.outlook.com ([fe80::b539:4693:e75b:c1e3%4]) with mapi id 15.20.1792.018; Mon, 15 Apr 2019 15:45:03 +0000 From: "Phil Yang (Arm Technology China)" To: "Joyce Kong (Arm Technology China)" , "dev@dpdk.org" CC: nd , "thomas@monjalon.net" , "david.marchand@redhat.com" , "stephen@networkplumber.org" , "jerin.jacob@caviumnetworks.com" , "konstantin.ananyev@intel.com" , Honnappa Nagarahalli , "Gavin Hu (Arm Technology China)" , nd Thread-Topic: [dpdk-dev] [PATCH v1] test/ticketlock: implement ticketlock autotest Thread-Index: AQHU82u11oPrH/0bEUOz0DplFOkgRaY9W66A Date: Mon, 15 Apr 2019 15:45:03 +0000 Message-ID: References: <1555319079-21542-1-git-send-email-joyce.kong@arm.com> In-Reply-To: <1555319079-21542-1-git-send-email-joyce.kong@arm.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Phil.Yang@arm.com; x-originating-ip: [240e:e0:e440:af00:14c3:5ec1:acdd:38ac] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ece29f39-489a-4e70-931b-08d6c1b95373 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600140)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:DB7PR08MB3594; x-ms-traffictypediagnostic: DB7PR08MB3594: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: True x-microsoft-antispam-prvs: x-forefront-prvs: 000800954F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(396003)(136003)(366004)(376002)(199004)(13464003)(189003)(2906002)(99286004)(71200400001)(5660300002)(4326008)(102836004)(229853002)(478600001)(68736007)(305945005)(33656002)(86362001)(14454004)(71190400001)(6506007)(316002)(74316002)(53546011)(110136005)(54906003)(72206003)(7736002)(7696005)(2501003)(486006)(186003)(11346002)(55016002)(97736004)(446003)(256004)(81156014)(6436002)(9686003)(53936002)(25786009)(6246003)(8936002)(76176011)(46003)(105586002)(106356001)(6116002)(476003)(52536014)(14444005)(81166006)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR08MB3594; H:DB7PR08MB3385.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: YzFon0au26UZAH3Re4lMI2smWhJ0uIZIwxZXtUWNDROJO6YUOPipPMfROv+D90HaFwB98TvchPT8oORc6fRsVOm+Ql+2Ujd7wkwm6GLg6k72qIoYqBg54EZAuZ5YHtGkKoQdIVaDTP7q7gsTlqZ9mcLseUwY3pdPWUA9uwwBbPtj/IY+nL8Zhw29x6kK+2X41v6iApB13ioAUE9kyU00gOqkPyiwsJFtBcxU4C36HhsMNGEPzdQQ+FxXrmawR7sr2VeIrPC6i6WZEauKM7IINMjpYO+xiISU/SYR2oX1XMSwBHcvjnNnISWuVwblyU1T47xCQVN/q6M8mLHabgnQ3pwHvZY7l7Q/bqOovqBAQT1Ub16bquqHrwi7lnfrTLJHsykfr3P+nYFU8n18MnYXI7J64tdZerAWTh2ZDhq75bg= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: ece29f39-489a-4e70-931b-08d6c1b95373 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2019 15:45:03.1616 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3594 Subject: Re: [dpdk-dev] [PATCH v1] test/ticketlock: implement ticketlock autotest X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190415154503.Q9xuP24717hjHs62BNn487RA6E8wfTaZ3WTGdISwo4o@z> > -----Original Message----- > From: dev On Behalf Of Joyce Kong > Sent: Monday, April 15, 2019 5:05 PM > To: dev@dpdk.org > Cc: nd ; thomas@monjalon.net; > david.marchand@redhat.com; stephen@networkplumber.org; > jerin.jacob@caviumnetworks.com; konstantin.ananyev@intel.com; > Honnappa Nagarahalli ; Gavin Hu (Arm > Technology China) > Subject: [dpdk-dev] [PATCH v1] test/ticketlock: implement ticketlock > autotest >=20 > Add ticketlock_autotest implementation in python. >=20 > Fixes: efbcdaa55b93 ("test/ticketlock: add test cases") >=20 > Signed-off-by: Joyce Kong > --- > app/test/autotest_data.py | 2 +- > app/test/autotest_test_funcs.py | 34 > ++++++++++++++++++++++++++++++++++ > 2 files changed, 35 insertions(+), 1 deletion(-) >=20 > diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py index > db25274..72c56e5 100644 > --- a/app/test/autotest_data.py > +++ b/app/test/autotest_data.py > @@ -175,7 +175,7 @@ > "Command": "ticketlock_autotest", > "Func": ticketlock_autotest, > "Report": None, > - } > + }, > { > "Name": "Byte order autotest", > "Command": "byteorder_autotest", diff --git > a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py > index 65fe335..31cc0f5 100644 > --- a/app/test/autotest_test_funcs.py > +++ b/app/test/autotest_test_funcs.py > @@ -131,6 +131,40 @@ def rwlock_autotest(child, test_name): > return 0, "Success" >=20 >=20 > +def ticketlock_autotest(child, test_name): > + i =3D 0 > + ir =3D 0 > + child.sendline(test_name) > + while True: > + index =3D child.expect(["Test OK", > + "Test Failed", > + "Hello from core ([0-9]*) !", > + "Hello from within recursive locks " > + "from ([0-9]*) !", > + pexpect.TIMEOUT], timeout=3D5) > + # ok > + if index =3D=3D 0: > + break > + > + # message, check ordering > + elif index =3D=3D 2: > + if int(child.match.groups()[0]) < i: > + return -1, "Fail [Bad order]" > + i =3D int(child.match.groups()[0]) > + elif index =3D=3D 3: > + if int(child.match.groups()[0]) < ir: > + return -1, "Fail [Bad order]" > + ir =3D int(child.match.groups()[0]) > + > + # fail > + elif index =3D=3D 4: > + return -1, "Fail [Timeout]" > + elif index =3D=3D 1: > + return -1, "Fail" > + > + return 0, "Success" > + > + > def logs_autotest(child, test_name): > child.sendline(test_name) >=20 > -- > 2.7.4 Hi, Reviewed-by: Phil Yang Tested-by: Phil Yang # python ./app/test/autotest.py x86_64-native-linuxapp-gcc/app/test ./x86_6= 4-native-linuxapp-gcc Ticketlock autotest x86_64-native-linuxapp-gcc/app/test -c f -n 4 Running tests with 4 workers Test name Test result Test Total =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Parallel autotests: Start test2: Success [00m 00s]= [00m 00s] Start test1: Success [00m 00s]= [00m 00s] Start test0: Success [00m 01s]= [00m 01s] Start test3: Success [00m 01s]= [00m 01s] Ticketlock autotest: Success [00m 00s][00m 01= s] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Total run time: 00m 01s # python ./app/test/autotest.py arm64-armv8a-linuxapp-gcc/app/test ./arm64-= armv8a-linuxapp-gcc Ticketlock autotest arm64-armv8a-linuxapp-gcc/app/test -c f -n 4 Running tests with 4 workers Test name Test result Test Total =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Parallel autotests: Start test0: Success [00m 00s]= [00m 00s] Start test1: Success [00m 00s]= [00m 00s] Start test3: Success [00m 00s]= [00m 00s] Start test2: Success [00m 00s]= [00m 00s] Ticketlock autotest: Success [00m 00s][00m 00= s] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Total run time: 00m 00s Thanks, Phil