Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1028202rdb; Sat, 7 Oct 2023 08:43:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFL6lP1pxQfjpdXGfJtDXHqyNrwq5fu0Uzr3b7rsUL0/idMLPprPD6TXH4am+z7812oRmwk X-Received: by 2002:a05:6a00:2e0f:b0:690:1857:3349 with SMTP id fc15-20020a056a002e0f00b0069018573349mr13543178pfb.25.1696693417942; Sat, 07 Oct 2023 08:43:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696693417; cv=none; d=google.com; s=arc-20160816; b=BKvEbUOZlrlZftxMaeX44CmwHLPj17oQ8H7ifzWr6eu+Y3c0cYRamOpu7/fCk3eAci opoF6JDtUgfeFQWYstJzWAf0a40yRBrM1tVbGAI4aE2OXVUx88PpJF6US4xqX/tkWVHs TvEYSW8dwJQmIArRJ7hsHkI4qz/WLeQBAwP7rI+DHEd5sNmUxG18Xh7BLiLrRNF9oED+ NglrdYLVQz3OPkhD2zfS9nr5n5wA4igHaCJmgrRx5sBKEN8R8OlyffTFTce8Bx9XneG+ 0T5HeFpjn2Ratz9La9cQon+Do9Qav98cXZdqyqAMGeW/PKE2UrFG3613nUQzdjglqF4A V9Yw== 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=t/XmnQ8BulCB8LjvQmFruCYlEAR5yQvD41aixSO30z8=; fh=idFdto88z5H80UdVoYD0Uv2hv1VoELfbsCkg+Pr+n/U=; b=lXerq/YfktGwTcBtN8BkQIw48YDgfBZuo6gObPFqYjC978i2o6yEKXn0DH7lXWJOvM 4qcuf1s6dVsGH1aGKMoG73KIngDCgog62wUdMwi4qTqO/esib8ZsS6aK8yAKY4mtw/2m 0AydhT4r9Qombig+R3KNYx3AQPIFeszXFr4eJEyGAMTCyxlXBqtCfYAl/CyCZug7ntiB skrRQYNuAZHgsDTW5Xmq+mmaWq1xlFSAoVKFExYNvCi8wpj5+HMVg1A5EtbazYpLNG2R q27SzykOSKhBqVKJxf3iXFc4uHkc9CKvWl8iuMTacyHaGV4BIgzAUULTkR7oFsJ7GcwO VSAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="e/5qMkfc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id u21-20020a63b555000000b005897bfc2ecbsi5087051pgo.205.2023.10.07.08.43.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 08:43:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="e/5qMkfc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 98402805D5FD; Sat, 7 Oct 2023 08:43:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344022AbjJGPn2 (ORCPT + 99 others); Sat, 7 Oct 2023 11:43:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234187AbjJGPn1 (ORCPT ); Sat, 7 Oct 2023 11:43:27 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B44B5BA; Sat, 7 Oct 2023 08:43:25 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1c77449a6daso27020795ad.0; Sat, 07 Oct 2023 08:43:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696693405; x=1697298205; 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=t/XmnQ8BulCB8LjvQmFruCYlEAR5yQvD41aixSO30z8=; b=e/5qMkfcA8WoEgJ2BfnfymOgeHfE4M3jvRX5qKVz0UrPtvG5BvmRc0qweYVBWGd6cw mF4kFmODBZRowxTqvBTjgbsTuoxC/Cn9HHU8RgIl2B8lrzksZP9ObV94/RUaHZXbbOnW 3aLQ1VCNr5uPIrILWOYyX4BR3eTTuwRVoZ4aYJJq4JZvdmkSNGJTAHQpn1EB3TaZrZZS OmQ3h1sXTlLo/vfjNtZ9CCigoEZp7T45dPBgO5y8CUN8DAG0r9Sw5HheXcP8R2gc0Z0c YkA0GHiSzXg2P1xNRp3oqsA4+RZgVgVafBDG4e/03tzyE6xelDJLlESzPTPP7kk7nguk jy9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696693405; x=1697298205; 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=t/XmnQ8BulCB8LjvQmFruCYlEAR5yQvD41aixSO30z8=; b=tRjStFhqk4MIEyNbJt9OsbNu0jZGSCNXG92m67iAaaLjYe8LDAw5/7on98pdaMdhfg EzAfOxMGvRMYXlVQDLneoSCLuJyRm1zGmGn251GADlISCt4AMe/kVls43M5gOVFtIWZp P98YNBfNbj17b75UspLns5WpQMALt4gtVixfsNtuDekhdCv5oo+03Sny4+j2vkxxMn73 /SbxozKElSRzG7nPq67tvBmRWOIQJs1GK2/XTvSJgRU8vCsdj9+w8HGG1sLqUyzdghEm aM7ZY8JPlVYaUl5bg70CKQE3k1OV5chMfcKadDH9w/wjQejgSJ9apY8E6/Rkpy/onkV6 V64Q== X-Gm-Message-State: AOJu0Yxs/UJM9NfUHCINvDhElKJznboptiATAvrx5OVw+6slO79C9BRT NoQvHKVP8Ur3HjFmSq6t/+U= X-Received: by 2002:a17:902:8f8b:b0:1c5:f0fd:51be with SMTP id z11-20020a1709028f8b00b001c5f0fd51bemr10068331plo.69.1696693405079; Sat, 07 Oct 2023 08:43:25 -0700 (PDT) Received: from atom0118 ([2405:201:c009:52e1:f940:d30d:8b60:5b64]) by smtp.gmail.com with ESMTPSA id l4-20020a170902eb0400b001b9d7c8f44dsm6053629plb.182.2023.10.07.08.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 08:43:24 -0700 (PDT) Date: Sat, 7 Oct 2023 21:13:18 +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: <20231007154318.GC20160@atom0118> References: <20230817091401.72674-1-atulpant.linux@gmail.com> <20230923173652.GC159038@atom0118> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230923173652.GC159038@atom0118> 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Sat, 07 Oct 2023 08:43:35 -0700 (PDT) X-Spam-Level: ** On Sat, Sep 23, 2023 at 11:06:58PM +0530, Atul Kumar Pant wrote: > 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 ? Hi Shuah, can you please review the changes and provide comments ? It has been quite sometime since I uploaded the change. If something is to be improved, I'll gladly do it.