Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp326152imm; Mon, 9 Jul 2018 02:27:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfeZjdzIkJdeQCaseemJNUofXdj7ZDFMwh/FDvR2vryRGHWWp2C13f23p0mvWVBlqy7/rjX X-Received: by 2002:a65:5bc4:: with SMTP id o4-v6mr12075328pgr.448.1531128444896; Mon, 09 Jul 2018 02:27:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531128444; cv=none; d=google.com; s=arc-20160816; b=zoAeKeVY2hD+BbBd/3146HnBqijslWinXBkCP2rbX6ZykBysjXLJk41yp8QAbBiL9F ECUhCrndE+w9SLLXHutZgb0uuvPPPfETtEMHFwyGYAmczHTP6gI/3ANSDkXq3IjrrdDA XT4AB83Tiq415MyFVq4WrmGuSTFE+TpxklqdMetZqnUBf1bkEVt3HrYXgJ617h8LRdd1 xoHWM4rV41kHzVJRrPiUsHrPxwFAdBBDLs+KiEzTnmXHaH2dl7hQawAEfjoCA6bBKNzO v8gWCPt3KJsqxTJVkFGh4vkfEIZILGDMV2eaI4BDJ4DQC8ChHDfiXsOReBVAwSNzRIJp jP3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=qKVJe1O52VBPRxDJlXJPWV1rL4DhPc9hjJ1B7DXQMDM=; b=xXLJT9XgWpIRj88FjvMgX5+T0cZ8OlXqp9AiPV2J896EYlJImYvMgXKPZXfJxPtjM2 5lHwggoPeCUD035ovviYOlWnqjXg5Tr9YdED2sBmUmUo2WFQqfbaz/j81M9uX3Qhg53F 09KsWgfvCKgrPSNbhtU0rKsZDC9JH7tJYmsMWJbVRwLKDxP3YzVNnQV0jMFdRC8cbraF JmBYaHkyDL3WfwCfC9ZL3HKwoDK3FjcCiJD8g4Ef0SrGOFvadUqGJSaI2M9fPWsVQseQ ECroyev1O1iuUoNfJNdphlkRcjF7jDansJrHJ5W8ytRz8scfSws69aMNFeLf817yrSxi kr1A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t128-v6si12993158pgt.598.2018.07.09.02.27.10; Mon, 09 Jul 2018 02:27:24 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932501AbeGIJ03 (ORCPT + 99 others); Mon, 9 Jul 2018 05:26:29 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:34914 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932366AbeGIJ0Z (ORCPT ); Mon, 9 Jul 2018 05:26:25 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9DA4A40201A2; Mon, 9 Jul 2018 09:26:24 +0000 (UTC) Received: from localhost (unknown [10.43.134.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C9D92156889; Mon, 9 Jul 2018 09:26:22 +0000 (UTC) Date: Mon, 9 Jul 2018 11:26:21 +0200 From: Miroslav Lichvar To: John Stultz Cc: lkml , Thomas Gleixner , Ingo Molnar , Richard Cochran , Prarit Bhargava , Stephen Boyd , Shuah Khan , linux-kselftest@vger.kernel.org Subject: Re: [RFC][PATCH v2] selftest: timers: Tweak raw_skew to SKIP when ADJ_OFFSET/other clock adjustments are in progress Message-ID: <20180709092621.GC1285@localhost> References: <1530813031-19243-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1530813031-19243-1-git-send-email-john.stultz@linaro.org> User-Agent: Mutt/1.10.0 (2018-05-17) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 09 Jul 2018 09:26:24 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 09 Jul 2018 09:26:24 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mlichvar@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 05, 2018 at 10:50:31AM -0700, John Stultz wrote: > In the past we've warned when ADJ_OFFSET was in progress, usually > caused by ntpd or some other time adjusting daemon running in non > steady sate, which can cause the skew calculations to be incorrect > > Thus, this patch sets a flag which we check if the clock was being > adjusted when we fail so that we don't cause false negatives. The commit message might need an update as the code no longer sets a flag. Other than that, it looks good to me. Thanks, > --- a/tools/testing/selftests/timers/raw_skew.c > +++ b/tools/testing/selftests/timers/raw_skew.c > @@ -134,6 +134,11 @@ int main(int argv, char **argc) > printf(" %lld.%i(act)", ppm/1000, abs((int)(ppm%1000))); > > if (llabs(eppm - ppm) > 1000) { > + if (tx1.offset || tx2.offset || > + tx1.freq != tx2.freq || tx1.tick != tx2.tick) { > + printf(" [SKIP]\n"); > + return ksft_exit_skip("The clock was adjusted externally. Shutdown NTPd or other time sync daemons\n"); > + } > printf(" [FAILED]\n"); > return ksft_exit_fail(); > } > -- > 2.7.4 > -- Miroslav Lichvar