Received: by 10.213.65.68 with SMTP id h4csp2117934imn; Sun, 8 Apr 2018 20:09:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/OdZUXbjvxU5arkgx8XSAdCFe3Vpaw+cGaKHphbSvTZEKE38ZHlXnRbsUq2NdYKixTytAy X-Received: by 2002:a17:902:6bc1:: with SMTP id m1-v6mr36273542plt.366.1523243347323; Sun, 08 Apr 2018 20:09:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243347; cv=none; d=google.com; s=arc-20160816; b=UPEhy2ovP0rh/9s7ulXDZfGOBE10Lwavn5D2FeH2vp2h8tNxGrzjcNzWWFXJHEaDGP Wm7WPGluI4MulmoGzbRRLSj35It5SNr2LPMP6n41CBPmVWARfwzPl5vgJOKFl7uOKpHY xk+cHqbzV/A/JiJt9Ylb2QhZHpZbd3hcgdv2x3K3FtVjVb3hAwkx0pV1MPnZiRWOiUAP JUr8XEVQUN0QBJkpWhiGkGUVCyEsgaBLg9m+U+5c7f2HQQwh0JaKHrezStNeyxyKWv/P XPAF6fwGkDesBItfKl9X4AwStmJZAovpq7mZkfYarwSLGBHfZhEUmzWM0BccA3yqrmeK uW4Q== 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=NeOub5XWrY5+TCH+o3a7b56uGt+Xsp9intlYi1tp6nWRxOlxWFTx+Q0v0KDPk+JZVI 4CNkk+n0tZaoZsSWI7APl6RNYZZA1+kjz665HxcXijv9iGNTwA5Ny0+5fwb2X2aFEPZX jg4juS9asc2Ey6bGOG7hbyqAqV305V0xDkXqu1Gq2tgPWMFhVMjziHFD/D40K/TnV3j2 UH80uz1OK890j4skqPDB3i3Gp/PUmDcsMLn0lFaFZrFjcv2IxbHK4UGhHlOFuR8Ceb/F aIW7nGz9krRFVNppYybtus69LktCXkZKESn+qye1F/UbVjwA8VU3qAHvcaVEogGXKHyL 1NBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=AVL1f0O/; 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 x185si10408878pgb.649.2018.04.08.20.08.30; Sun, 08 Apr 2018 20:09:07 -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=AVL1f0O/; 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 S932964AbeDICVw (ORCPT + 99 others); Sun, 8 Apr 2018 22:21:52 -0400 Received: from mail-by2nam03on0108.outbound.protection.outlook.com ([104.47.42.108]:9678 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755033AbeDIA3l (ORCPT ); Sun, 8 Apr 2018 20:29:41 -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=AVL1f0O/uxkTW9QpXH58qK1uT9bB+kukvx6N4hgPoBbQBtkYVmC8rQOiMAshQaJ61YoD9PykUqTp32KVekPrTRsnC7Xqv8IhK3ioXb/TymHuH323i/9D0tAdxTlTrpOMDeAu3gvu1S93wYCC/47sIUFupC6hwJ5GMnfot+BuqsY= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0967.namprd21.prod.outlook.com (52.132.133.25) 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:29:37 +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:29:37 +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.9 111/293] kselftests: timers: Fix inconsistency-check to not ignore first timestamp Thread-Topic: [PATCH AUTOSEL for 4.9 111/293] kselftests: timers: Fix inconsistency-check to not ignore first timestamp Thread-Index: AQHTz5kaz3pp9+bMnkisf3C3yiYUgw== Date: Mon, 9 Apr 2018 00:24:20 +0000 Message-ID: <20180409002239.163177-111-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-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;DM5PR2101MB0967;7:Wf56TKz35PdzQ0p2DvvnDIUCFY3FKH7mhGF86RUbPVDKp2NDYm9m332R2fkTW7zUwNsgNlxUlygz/UScti1Qf5OOwajYlaI3Iy3DdX+mUXL6aCWVDx22Bw/x+ofrs/8EIrqXiLr2jKZV1TqaEXeyFXPqzfVJr5jd5AcY0WQJOmCM9VzZKyCTh/tBSMOtST0dwvctbLYCOREYtq7Aqm1vW6O2sEb2eSHn46whWdh/rVZeN1V6Jig6Oh3HfL3iy9fA;20:QsPYolxO2W65DeD+xDhCPy3y/creCuO4cBf6L/nP5BjjrG4KCXNPLmxzUXhOF6dO94zUcjPi4w2PicsuCHfLVI8B4fjRbxhEoybnfsz1LNXIgZ3PvNWMVfFQFwgsl25Typc8XVunplt3XyNYk1dVvAmfZA3tnpuSJsVeJE0xEfA= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 03f29198-195c-46d5-673a-08d59db0f9af x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0967; x-ms-traffictypediagnostic: DM5PR2101MB0967: 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)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB0967;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0967; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(366004)(376002)(39380400002)(346002)(199004)(189003)(6506007)(486006)(86362001)(14454004)(59450400001)(68736007)(102836004)(99286004)(26005)(3846002)(6116002)(186003)(476003)(2616005)(1076002)(3280700002)(86612001)(72206003)(4326008)(446003)(54906003)(76176011)(11346002)(2906002)(22452003)(3660700001)(110136005)(97736004)(316002)(6666003)(5660300001)(478600001)(8676002)(6512007)(8936002)(39060400002)(107886003)(6486002)(53936002)(81166006)(36756003)(81156014)(10290500003)(6436002)(10090500001)(25786009)(66066001)(7416002)(106356001)(305945005)(7736002)(2501003)(5250100002)(105586002)(2900100001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0967;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Sj67EHMmcu7TQ3N/E39B7FhaoIBMRiaKAc3HIxRyJo/FPODMORrWdvFVQTBYHJKaMlH38jZL9swhiHp/sGLTtI7DvQ4QObdw3F5riuqBFSfWwp/GvtdHKYyzxVP0Gk8POfls68RpEsP79NKPpYCDF9HcjuR+HyOZD8HpOi8V/xOYEjIevX6KoPpGkK9JpbDHUzya/NuLRyFzUWmvIJPPVRM+uGY3aq/kNbpvHy6FEVy3LA/4cc+3gybkWrJOhnsOWMIAavNrUHJ3zBv6wvxaiVyfhKsZE6nlHRgTBgKeE+9voyk9nd6wm9ek1rdapEZQE44iG+XDvG/hHMItYacP8TyI0PfgjDE3/P+vWbr4D53+yHg3XR9zwpKghQlg5GuV5qYe/oNZnyk5Qq8GjtcG45XiK3xJSV2k3GXVIof1tgo= 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: 03f29198-195c-46d5-673a-08d59db0f9af X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:24:20.0969 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0967 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