From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48838C3F2C6 for ; Tue, 3 Mar 2020 12:17:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EE3D12086A for ; Tue, 3 Mar 2020 12:17:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="hQLj1tpm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE3D12086A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A27DD6B0005; Tue, 3 Mar 2020 07:17:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9D7E26B0007; Tue, 3 Mar 2020 07:17:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8C5BF6B0008; Tue, 3 Mar 2020 07:17:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id 709ED6B0005 for ; Tue, 3 Mar 2020 07:17:05 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 380A58248047 for ; Tue, 3 Mar 2020 12:17:05 +0000 (UTC) X-FDA: 76553950410.13.wound73_78021c5a9c525 X-HE-Tag: wound73_78021c5a9c525 X-Filterd-Recvd-Size: 4219 Received: from smtp-fw-9101.amazon.com (smtp-fw-9101.amazon.com [207.171.184.25]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Tue, 3 Mar 2020 12:17:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1583237825; x=1614773825; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=I5lhnzWRKWvNaF4MApexOfC/PP8h9gbeTKWBJi6wddY=; b=hQLj1tpmQPxTjCgorFHUSNzy3Npldpz/Vx0jpmu0hmcN90O1IxUE6EEY Xx6CuIvBHdISUqYt9t0RLbkcKV+UGnbo5Inl+XA4x3GL+wxmBPv+dGLme lgRsB3/HfIueW6J3vJMAuJiJnjkmW15HxEfnCYBhWg7gmAit3XHUzX1JQ E=; IronPort-SDR: /87kFaqMwDmzA7t3U62vAaD4BmoDpitQ7m99La8eO4oLFBsB5TgmwokkAxagaoZUuS3FlMHNlO T5bl0NeJwUZA== X-IronPort-AV: E=Sophos;i="5.70,511,1574121600"; d="scan'208";a="20475936" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2a-90c42d1d.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 03 Mar 2020 12:17:03 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2a-90c42d1d.us-west-2.amazon.com (Postfix) with ESMTPS id A2976A2C24; Tue, 3 Mar 2020 12:17:01 +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; Tue, 3 Mar 2020 12:17:01 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.160.16) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 3 Mar 2020 12:16:49 +0000 From: SeongJae Park To: CC: SeongJae Park , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [RFC v4 6/7] mm/damon/selftests: Add 'schemes' debugfs tests Date: Tue, 3 Mar 2020 13:14:05 +0100 Message-ID: <20200303121406.20954-7-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200303121406.20954-1-sjpark@amazon.com> References: <20200303121406.20954-1-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.160.16] X-ClientProxiedBy: EX13D22UWB002.ant.amazon.com (10.43.161.28) To EX13D31EUA001.ant.amazon.com (10.43.165.15) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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