Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2387500ybb; Mon, 30 Mar 2020 05:18:40 -0700 (PDT) X-Google-Smtp-Source: ADFU+vviPI4PI3g7kRMV2wwAhj/ILiJpdLWgLlgi43q29M2MKkCfcAet+AY/L4+AotI3ksgX6i1H X-Received: by 2002:a9d:3405:: with SMTP id v5mr9280978otb.131.1585570720086; Mon, 30 Mar 2020 05:18:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585570720; cv=none; d=google.com; s=arc-20160816; b=U0R9XBOZhqNbZ/dAAj8m8NLOY4QHi9VRfr4sht1zKNrZWQHuvIQtFt7raotfIPCqbN u7hVUROmQDcSnlXnAm+s7cxVTB85pCdNHo47+1KI2xblxrtvEe92N7X0bQonjhEaBO2s tgScG0aw37rQ4Rwg+LkR+0aStXxniN0+yR+aUzquB2PvuyQ8rfXG7X89iFgqXjHqC9h2 xLemisPxNf8MeBD6B6K7AgGRPVI6KzTA8M87+q+BtOvemDCHrH6PdpHbDH65izPcoD/l +u5q3buxp49Us5yVYPdy1Uh7CXnQCsq4vOpa0R5oT32qMnIxM1uxaG3GePZY5Vk5THzW y9+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:dkim-signature; bh=I5lhnzWRKWvNaF4MApexOfC/PP8h9gbeTKWBJi6wddY=; b=ya79U/LX/Jk70vVv5S3sHqgDhWExRWoNHgSFbav0sGBxEcLpYP2h3CEMfgHNAZ1huW vYcMrMFT4llFudCJUGWYZ2EKz4Ce4KoMD+nGA6/dkmIEWIZoQOWxApVgpgFM8FmQQUJX TWoDfpOUdc1g0sGgRhopnbt0x+FR8kmwuUwRKSVnGengOkj6tJrIhs5loJt56kS/eMn/ 8K7YvDO73vRB53k70eKBHy1GRA18GPrCmFk1twDYjqmrn3IJ/vYJdMrtR7mej/RyoxJ+ xapndXYd7Vn0epCEtU737bjJdRot/NZ1RwuB87/0U/b9ngO69GYVcsERxy11WTOwVwLr 3zhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b="YG/2hoG/"; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w24si6652240otq.131.2020.03.30.05.18.27; Mon, 30 Mar 2020 05:18:40 -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; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b="YG/2hoG/"; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730031AbgC3LyZ (ORCPT + 99 others); Mon, 30 Mar 2020 07:54:25 -0400 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]:7818 "EHLO smtp-fw-6001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728764AbgC3LyZ (ORCPT ); Mon, 30 Mar 2020 07:54:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1585569265; x=1617105265; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=I5lhnzWRKWvNaF4MApexOfC/PP8h9gbeTKWBJi6wddY=; b=YG/2hoG/hGuKfEGNYAXY7Tlcb343QyKs6eZEFZxxvORwAL+S8NGwWRhE kzfnXSqqdOtsrrUUzpdM/OJbNZ22gbo4JfTOwS0NlVCp3GlzDXGtTD+EI YYKo4HJxPpKvQiHPkypSLaFwKHwiGtomU42/HuPwEL11uisSBlJaco03m 0=; IronPort-SDR: b17/lJxz8iP13K8IYzrTUvcIFCUztMe6UutrTTGC9hnutqTN8FHdDKjqq8E6IUCUKUDkwiQ1b3 9g2Kpl0DyL3Q== X-IronPort-AV: E=Sophos;i="5.72,324,1580774400"; d="scan'208";a="24743547" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1a-715bee71.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-6001.iad6.amazon.com with ESMTP; 30 Mar 2020 11:54:13 +0000 Received: from EX13MTAUEA002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1a-715bee71.us-east-1.amazon.com (Postfix) with ESMTPS id 9FDDFA2489; Mon, 30 Mar 2020 11:54:02 +0000 (UTC) Received: from EX13D31EUA001.ant.amazon.com (10.43.165.15) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1236.3; Mon, 30 Mar 2020 11:54:01 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.162.134) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 30 Mar 2020 11:53:47 +0000 From: SeongJae Park To: CC: SeongJae Park , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [RFC v5 6/7] mm/damon/selftests: Add 'schemes' debugfs tests Date: Mon, 30 Mar 2020 13:50:41 +0200 Message-ID: <20200330115042.17431-7-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200330115042.17431-1-sjpark@amazon.com> References: <20200330115042.17431-1-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.162.134] X-ClientProxiedBy: EX13D37UWC003.ant.amazon.com (10.43.162.183) To EX13D31EUA001.ant.amazon.com (10.43.165.15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: SeongJae Park This commit adds simple selftets for 'schemes' debugfs file of DAMON. Signed-off-by: SeongJae Park --- .../testing/selftests/damon/debugfs_attrs.sh | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tools/testing/selftests/damon/debugfs_attrs.sh b/tools/testing/selftests/damon/debugfs_attrs.sh index d5188b0f71b1..82a98c81975b 100755 --- a/tools/testing/selftests/damon/debugfs_attrs.sh +++ b/tools/testing/selftests/damon/debugfs_attrs.sh @@ -97,6 +97,35 @@ fi echo $ORIG_CONTENT > $file +# Test schemes file +file="$DBGFS/schemes" + +ORIG_CONTENT=$(cat $file) +echo "1 2 3 4 5 6 3" > $file +if [ $? -ne 0 ] +then + echo "$file write fail" + echo $ORIG_CONTENT > $file + exit 1 +fi + +echo "1 2 +3 4 5 6 3" > $file +if [ $? -eq 0 ] +then + echo "$file splitted write success (expected fail)" + echo $ORIG_CONTENT > $file + exit 1 +fi + +echo > $file +if [ $? -ne 0 ] +then + echo "$file empty string writing fail" + echo $ORIG_CONTENT > $file + exit 1 +fi + # Test pids file file="$DBGFS/pids" -- 2.17.1