Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp374556rdh; Sat, 23 Sep 2023 14:40:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGR3HBCWAWcWfLLurkGDarRd76uTtbGlM021Fr44QT0fFxPCvC5sthfkjwEhx5jeqtHvPbJ X-Received: by 2002:aca:1307:0:b0:3a1:e7fb:76fc with SMTP id e7-20020aca1307000000b003a1e7fb76fcmr3486585oii.17.1695505226181; Sat, 23 Sep 2023 14:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695505226; cv=none; d=google.com; s=arc-20160816; b=Jh/rIF4//dgO9hE1UwRkaTzoxF721WvRiu2vlA12O5uBePvCsP3HE3YvWIjOfJGFKJ vVGYuxHWQqzBN8nFCquaSR3Vzvq0avJt5PRZdFMZ67BAzckDLdwfueoThyCLocDBwymY IhYUghwJrFuMTLEmoLKIN1+ggFEbFlgZ4P2IzHQx37ao0KcCwrydBYSEDZMgCjf1qEzB 65aYiemEzFu23LTPs2WwlNrEiYzFtiaLLyz/gjUYr7AzaGrGY6ueVKrk5cJJdf44kuGK dc9XX1ySq0HXiZjCyGDaspCnO1Ta3f1E9dXbOVfJ72jZy2qB+vDgo3Ox2HgGdDEwldMV UXmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jlE6JLRfL48qtVwq8jA/2h0BZ48NcfrSjI1lDQ5avkE=; fh=idFdto88z5H80UdVoYD0Uv2hv1VoELfbsCkg+Pr+n/U=; b=NYpcij4ofBpYJOY3on9Z1JAoe21pnzOAoE/EPLGL8fVHhFXj3p9nWC3u8nSJxHII5d CIgkq0aw+vDQKRgWvkN3wrmFktp/2LVws1FLsLGjzMVrrTxEEvVmW1nQecV2GewlfZvj rE6Rq14OJ6FgWzQ6+CXzJINlaiE9n0f1cRHM5Aoob6qX3JZDPvWFLfPmWLDeBRKtJhEV LjfbQyJhaEcJIrYBzffHsNzGWgWOhzaN7iIQgSfwvxle86Jl4ONIAwH4Pppj+R2DNt4R 9QDa2Vuy9JLUB1mh6JkoHumiMtFC1Z72lCODyh5IWG2F0l9CBPMu8AttquW4xOYhlmgC 6bGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UUDKUWN6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id t4-20020a170902e1c400b001c5bd53fa38si6307457pla.99.2023.09.23.14.40.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 14:40:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UUDKUWN6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 99251809A79D; Sat, 23 Sep 2023 10:37:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232091AbjIWRhG (ORCPT + 99 others); Sat, 23 Sep 2023 13:37:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231831AbjIWRhE (ORCPT ); Sat, 23 Sep 2023 13:37:04 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8431519C; Sat, 23 Sep 2023 10:36:58 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1c39f2b4f5aso29766245ad.0; Sat, 23 Sep 2023 10:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695490618; x=1696095418; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jlE6JLRfL48qtVwq8jA/2h0BZ48NcfrSjI1lDQ5avkE=; b=UUDKUWN6eT64lnmOU3admofshJbH0x33cyjAFmu3qr4uF528zwtB7P2xPv+L5jqa2S SKiBgdIAmZWaHRbJbAzMDI/f+hC10EdF2q1wqM1OZ20OVJuy3AnFuYxwa16Dt5EiEps5 EoNpOmgTQW+g3DmAGo9domgb1o+dPiJvKpV4HwWb6gZp3x/grizgbLLaCWjlcpQVGag/ 06jfntnoHsJPjZjXKflw/8Y22YEbJJfOd9TT7N3JiLFgvyCZg9YH5NzBlneO2us9aPEk 6RpzU+UvOqBqpR0ESO8dtZ9hzPMUdxMYSAjRNQxbtiD6ffjXA7TuvqvQDVFuKiaqnmf5 Iszg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695490618; x=1696095418; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jlE6JLRfL48qtVwq8jA/2h0BZ48NcfrSjI1lDQ5avkE=; b=C6FX4aDJ0uFzgA0DklRZZdIgongw8Hsl7mo/v1GY1xjh4rw2OMlosK2GcZCkL1XtQj rNkMdP6D25vFggQOAewrrutORjSMgeS0clhroFNxpfsp1vKknhzZMN7hFCbgKiYJndDn GPq2+fFOYMxOm3LvX6SrM0YFIb565DMe366NPofyhcDpMr7Ck6fkohphhHKFwQEOPhku ny5MfkiW1XYQmrDP/ebiHeZ0R/FAxit5mrxGkmO+VB3U+QratOys4KjOVeQNCMJhvtAR cfelCZwqme/2AQcmtCVH1oKR+eNySwgiIDTNEv6Yg4ZGL+lBLYNYseVyegUD6o97nulu mhlA== X-Gm-Message-State: AOJu0YwmRirPCIDPgoDRr7iHVSVmUOnlaeIGoNMS0KY+WMtx+ij+UBeO gfCBhbNJg7KqFwub+H26WxIL/fAYa2U= X-Received: by 2002:a17:902:e84d:b0:1c4:50fd:7cd1 with SMTP id t13-20020a170902e84d00b001c450fd7cd1mr2130303plg.11.1695490617930; Sat, 23 Sep 2023 10:36:57 -0700 (PDT) Received: from atom0118 ([2405:201:c009:52e1:3075:4405:fdad:b3f9]) by smtp.gmail.com with ESMTPSA id n5-20020a170902e54500b001b8b2b95068sm5585448plf.204.2023.09.23.10.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 10:36:57 -0700 (PDT) Date: Sat, 23 Sep 2023 23:06:52 +0530 From: Atul Kumar Pant To: a.zummo@towertech.it, alexandre.belloni@bootlin.com Cc: shuah@kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, linux-rtc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6] selftests: rtc: Fixes rtctest error handling. Message-ID: <20230923173652.GC159038@atom0118> References: <20230817091401.72674-1-atulpant.linux@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230817091401.72674-1-atulpant.linux@gmail.com> X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sat, 23 Sep 2023 10:37:16 -0700 (PDT) X-Spam-Level: ** On Thu, Aug 17, 2023 at 02:44:01PM +0530, Atul Kumar Pant wrote: > Adds a check to verify if the rtc device file is valid or not > and prints a useful error message if the file is not accessible. > > Signed-off-by: Atul Kumar Pant > --- > > changes since v5: > Updated error message to use strerror(). > If the rtc file is invalid, the skip the test. > > changes since v4: > Updated the commit message. > > changes since v3: > Added Linux-kselftest and Linux-kernel mailing lists. > > changes since v2: > Changed error message when rtc file does not exist. > > changes since v1: > Removed check for uid=0 > If rtc file is invalid, then exit the test. > > tools/testing/selftests/rtc/rtctest.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/rtc/rtctest.c b/tools/testing/selftests/rtc/rtctest.c > index 630fef735c7e..27b466111885 100644 > --- a/tools/testing/selftests/rtc/rtctest.c > +++ b/tools/testing/selftests/rtc/rtctest.c > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include > > #include "../kselftest_harness.h" > #include "../kselftest.h" > @@ -437,7 +438,7 @@ int main(int argc, char **argv) > if (access(rtc_file, F_OK) == 0) > ret = test_harness_run(argc, argv); > else > - ksft_exit_fail_msg("[ERROR]: Cannot access rtc file %s - Exiting\n", rtc_file); > + ksft_exit_skip("%s: %s\n", rtc_file, strerror(errno)); > > return ret; > } > -- > 2.25.1 > Hi Shuah, I have made the changes as per your comments. Can you please review the changes ?