Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3237633iog; Mon, 27 Jun 2022 12:05:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v4tAjbhcavIQv6PFNFi7FAcfxC7t+xpH/mKjPL0ouJoSy4YfVksY1RnkGia/oaxlsxyoSi X-Received: by 2002:a17:902:8e86:b0:168:d6d6:660f with SMTP id bg6-20020a1709028e8600b00168d6d6660fmr16447028plb.35.1656356755652; Mon, 27 Jun 2022 12:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656356755; cv=none; d=google.com; s=arc-20160816; b=vyodFfXboOgRL3miFhf+ecAbHu2CSvjMLSyLkBvDg9hcJQhLoNa/Gg1vjC7UbPBnyO FRLT565dB+Cssc980V/8scu6nnFxgn1dDRZDZUhl3l0TiYNRC4MpDIhVcEBq+20wDLcx MHc/k96HiXCbnM5GVESlaEiyB5o0uEI19alQtB4bFDBJ7Eegoeldv4vY4wjHrvhHOfIH ngw9pDUB2MDiEhEAOlViDGjgESsrAPBs08UTpsLntwvwmRhSyg/z6boVtg7b8mfo1GVE 9NUqBVl3N2N/Yob0a13VjXe45xuzEd3aotKVeholczflgNNUefJfDJQNVQU+f12OoY61 kIRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NOsgPwcDx+OihP7CM9EgDPr6TtruXCYq9aRNj46ysBQ=; b=M/2d82GSKRe98mI+328eLbqyUTcnc+cdabQwV6qxmfZmgIHd/DuCIaTCwzS0kUWueY gF8K6sDWPG5kMgADQT/b4PZ0+2NS6Qb607Ww68LnoJVnOELbFgrDskGnnWlkq+2IL8Z0 HZdLUuZ1yYGNusLUWi88Zq09ACGiau6De35+8jXm+JZ197p9z/HP3yms/G3GtnsLkrYT M8Zar59QNkd61YV/RfWO8i6YPOw7iIEgi6LCPWfOdkaf+N8UBw1QVq6kBOke0fUqhV2S OZL7N7/CyKZHkvQpklDMQK2tw5JaUjAh6MuNuwyGCFMCMZ8DwXRumedEr6YQnK4DBZP9 87iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=m2eUHMAt; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q193-20020a632aca000000b0040d9b49d8c0si12806853pgq.59.2022.06.27.12.05.43; Mon, 27 Jun 2022 12:05:55 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=m2eUHMAt; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237633AbiF0S60 (ORCPT + 99 others); Mon, 27 Jun 2022 14:58:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239147AbiF0S5P (ORCPT ); Mon, 27 Jun 2022 14:57:15 -0400 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 467A410C0; Mon, 27 Jun 2022 11:57:14 -0700 (PDT) Received: by mail-qv1-xf2e.google.com with SMTP id o43so16179005qvo.4; Mon, 27 Jun 2022 11:57:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NOsgPwcDx+OihP7CM9EgDPr6TtruXCYq9aRNj46ysBQ=; b=m2eUHMAtpzvN+Y99ePVbPBQhAiBwfdEMa4sYWEHf2vtSBRaVt/SObAY73NbhrfVRfT bIAQti3EBUREmLes+VGyWRM/whbdbjPFFIuDU/j3NkDwPE/jOD3NueZzE82yw60Vs2Yc 3a8s7Yt92kyWFupcn49IGDFq2DfzziTMaUL/KsaDcRlQ+mv5JEU1/Z8gxzeJP5Mq7INE mZyZpzrs+NVF5UJ38AiWA7JgBQu6LWX5NqeYEMPyHcLd7m4ZvXM1mtntv9xK71DmrCJV 3PLqp6sEguoeleMa70eC8OzsTFBtGVG58Kmve2RhNwey7dXpIv6CFExpLh+oqa94Vqkr UQ4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NOsgPwcDx+OihP7CM9EgDPr6TtruXCYq9aRNj46ysBQ=; b=UArkldCLlMklvJThRGaV1iFIU37IuNO49rJpecn5qfXZXTUD6pRq2B7CwxbGnrG0ds 5KHd44Rb37K0rkxm22jIYfxriQskVmkDfES/s2tktMem3bQHUOw0zukLkJH6cbyyeQAo XH0Vxc0anyNZdhjtw9KH2pfBb4lCb5jn4Q73mFyReNXsWBdbcbM6T+82GT+oiYqb6yrt GHWFmzCP8RwehHM4hGw0vPeU3INTD1HLq7f5Ue8wSuLidz/bn/y21hQ8AJIESykM7pEG 37HLP+pm9cTC2DxdMPa/5ZDaWgHw/JeUxfT5+CMW9eN3aRFLlKNpefDuWJkvT99spFRT lliw== X-Gm-Message-State: AJIora8HdfwZmjWdpzjaD8hSFTdNAkbzozqBxtWhR9xjKClISFSiC9aB 194GXnxkZFprlbYdqQ0R9yo= X-Received: by 2002:a0c:9a0e:0:b0:470:5ffa:ff43 with SMTP id p14-20020a0c9a0e000000b004705ffaff43mr745456qvd.6.1656356233274; Mon, 27 Jun 2022 11:57:13 -0700 (PDT) Received: from localhost.localdomain (ec2-35-169-212-159.compute-1.amazonaws.com. [35.169.212.159]) by smtp.gmail.com with ESMTPSA id g1-20020ac87f41000000b002f93554c009sm7781826qtk.59.2022.06.27.11.57.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 11:57:12 -0700 (PDT) From: SeongJae Park To: Shuah Khan Cc: SeongJae Park , Gautam , shuah@kernel.org, damon@lists.linux.dev, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] kselftests/damon: add support for cases where debugfs cannot be read Date: Mon, 27 Jun 2022 18:57:04 +0000 Message-Id: <20220627185704.58902-1-sj38.park@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <7d6b7de6-4609-e6ca-0a88-1f9799c70769@linuxfoundation.org> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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 From: SeongJae Park Hi Shuah, On Mon, 27 Jun 2022 11:00:18 -0600 Shuah Khan wrote: [...] > >> --- a/tools/testing/selftests/damon/_chk_dependency.sh > >> +++ b/tools/testing/selftests/damon/_chk_dependency.sh > >> @@ -26,3 +26,13 @@ do > >> exit 1 > >> fi > >> done > >> + > >> +permission_error="Operation not permitted" > >> +for f in attrs target_ids monitor_on > >> +do > >> + status=$( cat "$DBGFS/$f" 2>&1 ) > >> + if [ "${status#*$permission_error}" != "$status" ]; then > >> + echo "Permission for reading $DBGFS/$f denied; maybe secureboot enabled?" > > btw - does this run as a regular user or does it need root privilege? > If so add a test for that and skip with a message. It needs the root permission, and does the check at the beginning[1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/damon/_chk_dependency.sh?h=v5.19-rc4#n9 Thanks, SJ > >> + exit $ksft_skip > >> + fi > >> +done > >> -- > >> 2.36.1 > > > thanks, > -- Shuah