Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp284329ybg; Wed, 3 Jun 2020 00:19:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3g17AlBa+GgpPiJb6UM4kKr4YkXczdow3YwnAs4hrEMGg0/Y/RNHKCUb+rvCLmJ9mNeaC X-Received: by 2002:a05:6402:1441:: with SMTP id d1mr9952035edx.93.1591168774919; Wed, 03 Jun 2020 00:19:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591168774; cv=none; d=google.com; s=arc-20160816; b=yBqhsjMbRc+FF/zpfnzL6tf1bifWRxmYSfaCfAxnhKnYH3hpegc8KeZtAaz2VVC3zP +3ZBmnnQ0vxE1NXRoaS/4AzmUOc00fHjKdF+nnjIHn9tzGwuDPMrW5DA+z9glB+7Bshw lnbMNGy2iT2U0MLoE9r2w2mZjAYsrfJHOKwz6/p98p5k71N6gFCYjdrFIzu0VCzDEkTK vhWL4TnyGQtMZQCq+YBe2pVqN6wB+AwNFIo/HAuBgq+BY09ZRve6MfVWH53h3Vkt2i+T zkpj8lgWqr/xzzW7hPPv8rLsJlFW6pGOKVyf8vD6GEHhx9HGpedK8hIwX32ijXfLgRis EQAg== 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=b5EEY//uUmxww4MeXLoOfsSYKFHirbB/BqQ/qTWvUzg=; b=q2TkgnY/i8VWc7XpJeF35rdUSLapNJsJaLFUNNt3Knotnp2tu8bn9+UUrlL3b8EZdX DWnhslNspLA2WOxJt3pqUgisUD8Gsje7pkD9I9vG7GNi/OtqPXUB1rrmHjrz2XjIgvNb 6j7tz9p70hqjL5+xN7L2Fz1gnqB5F3g6P0jijBMPl6pa+t0QIe+TS8xv+ily7CyIDT9O wE6AXCuRuZHf+lJrIEDuZQO5dCFJ3YPq56Q4puLbQ1wjk3eGsJ0pi0EVV5i01WEZJL+A wduSEH6M4QpfsbHrSatKcSwZ1dyURoNfFIig/iSd9IuNsAzFjXpm2qLfosFeZ+NG9Xib nN2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=VgH9tHFS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id fy2si717772ejb.11.2020.06.03.00.19.06; Wed, 03 Jun 2020 00:19:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=VgH9tHFS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726062AbgFCHQi (ORCPT + 99 others); Wed, 3 Jun 2020 03:16:38 -0400 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:12891 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725810AbgFCHQh (ORCPT ); Wed, 3 Jun 2020 03:16:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1591168597; x=1622704597; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=b5EEY//uUmxww4MeXLoOfsSYKFHirbB/BqQ/qTWvUzg=; b=VgH9tHFSm2gPaMFL2hoib1WaU5m+VC6gNzveLNnbjvXrxWLz1854i9La ylOyg6UYQo+qpNjpp6wJ1c6bCb3RK3XAdUDYQ5gpG+DKU5M07qd4c6edg E/JuXisglvnycs5vjnmg78nGjbc7x0OLdgHCWV1xQSztELl136LEG0cnt U=; IronPort-SDR: /k0QNW6GRPzb8OtPKZHEuh76x8xYBrNQC11dfck1XE1vsqINY3dtEni+N4FDMfQIwaCrbaB9MX W+dmU762QwWQ== X-IronPort-AV: E=Sophos;i="5.73,467,1583193600"; d="scan'208";a="41160802" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1d-98acfc19.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 03 Jun 2020 07:16:33 +0000 Received: from EX13MTAUEA002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1d-98acfc19.us-east-1.amazon.com (Postfix) with ESMTPS id 7019EA184B; Wed, 3 Jun 2020 07:16:20 +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.1497.2; Wed, 3 Jun 2020 07:16:19 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.160.26) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 3 Jun 2020 07:16:03 +0000 From: SeongJae Park To: CC: SeongJae Park , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [RFC v10 6/8] mm/damon/selftests: Add 'schemes' debugfs tests Date: Wed, 3 Jun 2020 09:11:36 +0200 Message-ID: <20200603071138.8152-7-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200603071138.8152-1-sjpark@amazon.com> References: <20200603071138.8152-1-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.160.26] X-ClientProxiedBy: EX13D10UWB003.ant.amazon.com (10.43.161.106) 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..4aeb2037a67e 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 multi line 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