Received: by 10.213.65.68 with SMTP id h4csp2118606imn; Sun, 8 Apr 2018 20:09:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx49yAQLF34LrFV9wW+Ko7isqi0JPAYDtlfh94aPNbw5DAdel4BBPyegXKYhNmGPl5Du/7cGM X-Received: by 10.99.63.205 with SMTP id m196mr23235479pga.82.1523243399863; Sun, 08 Apr 2018 20:09:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243399; cv=none; d=google.com; s=arc-20160816; b=alqeLd9AUFzaNoB7HZrwSKNhCwQa2/Av5wOkft6uSo+TqzGr8JiTB47BO3Gtm30DiO 96tdshCehzHfzhj8kPACOu8aLunTYIMwFiDD/elBx1Ny4pv2Y2oLx3r0FME0XucMUvcl 6s/YVRxwO8qKn8jvKLFZ8rxNDOyPAX5+tZqJ5L4zYcpPppLK1L7b/We+6r8acG7FaZdq 0sKinil4A7imzkkpdKKj1oyC/+KleHV7EUgIyaG0S0L58fztgNb2235etJnQGsyJ0gRe wa2GZ4JJYWwd3Rutn8yfTkWxtk6WNign0WOupmy+PSsuts4vX3lOegWktEujRkkG8qad vCqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Uir3rg8hvg3SpV7UGGXiSYJpcshjV0b7snjb+GlHCG0=; b=L7G4HnSSNCfvKsZpkMpPWupp63jNnVua5dx4me6JcvNuOM3G9gHcya6L/bsvLFWcfv swu1alJSUOS8dVIzP7MplY5UxN2IneigEksB4YDQGCFB3+hPcd5fbUzgypNmpi37p6oC c/dSXd0Yo7BNf12DwNHgFc8yp9PZueviX6J4HXeIhstT4sz4ZSRZVMukl50x5389pE/H UiioOY9uTS/7yoSG5vNWeZJPBFFEhTea9g8b08winSflmiYB8uOJq9nE6Zd74r+jIhrJ 1e0RzYE/OTNr+nbDaGEr1rWr883Vb3O39iraVCwYPFMAYCihoWxZ3wFUW9nfZ+Qei4cB 3PBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=oRVYwCKi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m21si12081442pfj.25.2018.04.08.20.09.23; Sun, 08 Apr 2018 20:09:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=oRVYwCKi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757065AbeDIB13 (ORCPT + 99 others); Sun, 8 Apr 2018 21:27:29 -0400 Received: from mail-cys01nam02on0106.outbound.protection.outlook.com ([104.47.37.106]:1992 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756702AbeDIAgP (ORCPT ); Sun, 8 Apr 2018 20:36:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Uir3rg8hvg3SpV7UGGXiSYJpcshjV0b7snjb+GlHCG0=; b=oRVYwCKi65xRYBILfCjJ7jZmMv9VWUW1VvFd8hGtjV+3HyP3O51McOe76bLIpj14qIbgfJmwuWZUH1MWEjrNZhsoad0pIgQ0MB71TL8HkAmoL2YJos/06vToCkqBBQCO4KtTEq38qKFh//TuE+4Fe8YoHJWzzmjl5AVMQBDtIg0= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1015.namprd21.prod.outlook.com (52.132.133.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:36:12 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:36:12 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Miroslav Lichvar , Thomas Gleixner , Ingo Molnar , Richard Cochran , Prarit Bhargava , Stephen Boyd , Shuah Khan , John Stultz , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 059/162] kselftests: timers: Fix inconsistency-check to not ignore first timestamp Thread-Topic: [PATCH AUTOSEL for 4.4 059/162] kselftests: timers: Fix inconsistency-check to not ignore first timestamp Thread-Index: AQHTz5msNx0fzLpnzE+0EwO/HbQiQg== Date: Mon, 9 Apr 2018 00:28:25 +0000 Message-ID: <20180409002738.163941-59-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1015;7:lilyAujqHg5hTuP+NsEF73PsWZV58BAb6oHryCABcrAHMnSc2q4B5noKDFP06II+WSGdv41fseynE44Va3JwaUzMFkAnWN2gb5LidoySM971CVqNC+Aq2qbJ4vZgUGmiLBqu/1rTWL6UOlF1JydQRhM5msY6kZbFVqTzOX00h8kztc0A5UZ196zNMs7EyPiELCWJMwWUJDsC4uQVUVvnR5u5fBqtaMVhteIX03eC2pkegazcNmNc/FaY3WXeVsnS;20:eE0StrHLClozlLPPeNXms1HNeENTwv/Fn5fhqN+FbcV03sEn5pqnzl62kNiAPRPQh+OoIzxLzWT4M04Ch0zFJk4WE/BB0+gdP0os9zgI1ICqmJSz7gG7TUVYqf2OH45ZeVx04acgNpXKIcCqxmUPq+lhwHd20Cp14QuUNnBm+Ew= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 3c3c2785-d0dd-46fa-d111-08d59db1e536 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1015; x-ms-traffictypediagnostic: DM5PR2101MB1015: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB1015;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1015; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(39380400002)(376002)(346002)(366004)(189003)(199004)(53936002)(4326008)(478600001)(72206003)(3280700002)(2616005)(14454004)(305945005)(5250100002)(3660700001)(2501003)(2900100001)(54906003)(110136005)(86362001)(1076002)(107886003)(6506007)(36756003)(446003)(68736007)(6512007)(7736002)(486006)(2906002)(5660300001)(6436002)(3846002)(86612001)(6486002)(66066001)(11346002)(7416002)(476003)(6666003)(59450400001)(26005)(10090500001)(316002)(22452003)(8676002)(81156014)(81166006)(6116002)(105586002)(99286004)(186003)(106356001)(76176011)(39060400002)(25786009)(97736004)(10290500003)(102836004)(8936002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1015;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: UzZDZkBgbpyDnk4JGAGQwZUEtRqrU4SS5kh5OI6M7FGhk1/G9rEbB9RWvDjb8u1H6FL4WegJ7UBhmFQHvykpZbTCh7IKtqUjFTOxbf4RECvHmSdb3fNTgXWvy4UZYvzdHKLNzNyYdfZk9aq10M5O/uZj4PMXJKVA6gfgFD6gePLik136iQlv/4mLLi79UDkjj01cchi6RSaaD2V2WFpzirwMAp2d+VB26HY9yVyA4Ii4tMspYo8f0H1sCGmE6ybvSG5vZL1AVYjIRtUAtHNvpJ4VAzGaoi+LHcxdRBNt/ZmfYcog6u/xpdNOyMgIxhwIWQvvpaTqITjcxegUDMIFr4Q1mdgEsJU7z9pwc9yAuTuAlxbmaNhVV9+cirAJxdldcaDC4lMJYShtLZo7PPnaWoJTTsEJb0eBEkLjpAj6HQ8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c3c2785-d0dd-46fa-d111-08d59db1e536 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:28:25.3956 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1015 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miroslav Lichvar [ Upstream commit 7a5de5512296fd2ab7a497e4a576196b1f046e78 ] When the first timestamp in the list of clock readings was later than the second timestamp and all other timestamps were in order, the inconsistency was not reported because the index of the out-of-order timestamp was equal to the default value. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Cc: Shuah Khan Signed-off-by: Miroslav Lichvar Signed-off-by: John Stultz Signed-off-by: Sasha Levin --- tools/testing/selftests/timers/inconsistency-check.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/timers/inconsistency-check.c b/tools/t= esting/selftests/timers/inconsistency-check.c index caf1bc9257c4..74c60e8759a0 100644 --- a/tools/testing/selftests/timers/inconsistency-check.c +++ b/tools/testing/selftests/timers/inconsistency-check.c @@ -118,7 +118,7 @@ int consistency_test(int clock_type, unsigned long seco= nds) start_str =3D ctime(&t); =20 while (seconds =3D=3D -1 || now - then < seconds) { - inconsistent =3D 0; + inconsistent =3D -1; =20 /* Fill list */ for (i =3D 0; i < CALLS_PER_LOOP; i++) @@ -130,7 +130,7 @@ int consistency_test(int clock_type, unsigned long seco= nds) inconsistent =3D i; =20 /* display inconsistency */ - if (inconsistent) { + if (inconsistent >=3D 0) { unsigned long long delta; =20 printf("\%s\n", start_str); --=20 2.15.1