Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9341867rwd; Wed, 21 Jun 2023 06:20:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ovpcINNW04/ZBVli5WSqCeMAYCWm43+7FnYBocgPgu38yRa5sSTPRhNcBC4muQi52CSKo X-Received: by 2002:a17:902:e884:b0:1b1:adb4:8fa8 with SMTP id w4-20020a170902e88400b001b1adb48fa8mr6093949plg.39.1687353626786; Wed, 21 Jun 2023 06:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687353626; cv=none; d=google.com; s=arc-20160816; b=hGPr9z9MoTupSk+TOlNEgfSMUFUhaKYdFqkZbp2nnlJ0txXnQTdqeZyf299VSC8PQO C3ks2kzOctbuy5rrBPrfvZTMErzt7b1xr4kSVsP4XWdvSo4UR1iEu5mm6neuo2qLYztG OPBz2LBErDEsTbL8GgZNIj6Esx1ATsLWZZqjTiRw41lcCNI1DKsFEGBlbDxL+DewYHz/ F6nO4lcFRjhOScPmhvbC2u5fe61CRQqDndkkBL+waJoKmTwfh1X4Y7SvkgDfB/BEYUgc 0qf6Qofdt/2xUMrKWtxqqBUxCTlIpIilRFM3JDI4e/tl2KyQg2UjUAJL1p3N9oDMAVeF SqEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=dtdMmwUqOkXMJsivwEbVxmjyaY7/99ZHofSphWqFuTg=; b=T6IYMOgTg3bOBLdqudvr1WwiF5hRh8eXO2bWLJf9EV8V9fOq4OyBCYO/TPLda66vao kh6JgsUK9JJCg8yrSchkBxgLen/rb+mahrtjxS+Msnwq8KwGXJ5r4QjNrNZGXAB1+YGM Olv7DmVsM0Xo0i8Zn+EfNldsnRZtRfSGoIqGrH5hl/odA6deGf4fM1vwzEl94LECUlWk lv84TaolmTCv1gRPvVCLD9oBFaZQrq7lV7yPL3dmZKF3YuVqPQCWhHU9i2Py6o5T8Q8z SH669IoCxmnY14bYNmP/f+omYhLf07vix6pZgEIy5n40+EFwxcL+FF7B3BTuX2vu5aC8 TKhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lf14-20020a170902fb4e00b001a95d336558si4055891plb.594.2023.06.21.06.20.14; Wed, 21 Jun 2023 06:20:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232093AbjFUM7m (ORCPT + 99 others); Wed, 21 Jun 2023 08:59:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231156AbjFUM7l (ORCPT ); Wed, 21 Jun 2023 08:59:41 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F326FAC; Wed, 21 Jun 2023 05:59:38 -0700 (PDT) X-QQ-mid: bizesmtp73t1687352369te3lj68z Received: from linux-lab-host.localdomain ( [116.30.126.60]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 21 Jun 2023 20:59:28 +0800 (CST) X-QQ-SSF: 01200000000000D0V000000A0000000 X-QQ-FEAT: xwvWJGGFd7Pp39HRCTQYRbgJy3bbvGHQ7WlZR48+2RLviBp/41ZiQ96oKRZr/ SilZzV0NenGnJQOAoEBB0FsmiBH7+SiFV9oelPczpDc5Rv6vON7sAY8uZqZwSd+t40quVga UlD5ndGNbGYHcYN65235Szzzn+W3uQJbRs+cM5+xVrvNtkhz8C96FkkUB4g30N+3iiIrT18 IQ6Ef+55Bvl/Wb4QA6h+fvhx0tjuE67lIQ90/3id1+HCtIisliMmEsk8Ug9bqvYo0ghVbrP B7xN3wcVi695bHsw5s8IapJuwl+GKCEXCNiaucghBROurHs1Z2GS5Y9guTFLTImqjkXOMkJ m22jHKU242jcgYr6CLmUguUae2HlOWvJPWimeF9ZtAi9dq0bot3TJaA2a7Ar64D7EGcWIyU X-QQ-GoodBg: 0 X-BIZMAIL-ID: 18004566144104333474 From: Zhangjin Wu To: w@1wt.eu Cc: thomas@t-8ch.de, arnd@arndb.de, falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 05/17] selftests/nolibc: stat_timestamps: remove procfs dependency Date: Wed, 21 Jun 2023 20:58:58 +0800 Message-Id: <5f80f3dae60f77c6b746578113e56c8fa6454143.1687344643.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz3a-3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since it is not really necessary to use /proc/self here, instead of adding a condition check, we use the always existing '/' path instead of /proc/self, this eventually let it work without procfs. Signed-off-by: Zhangjin Wu --- tools/testing/selftests/nolibc/nolibc-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index ebec948ec808..2ef44176f7a9 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -520,7 +520,7 @@ static int test_stat_timestamps(void) if (sizeof(st.st_atim.tv_sec) != sizeof(st.st_atime)) return 1; - if (stat("/proc/self/", &st)) + if (stat("/", &st)) return 1; if (st.st_atim.tv_sec != st.st_atime || st.st_atim.tv_nsec > 1000000000) -- 2.25.1