Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp583806ybz; Wed, 29 Apr 2020 05:52:20 -0700 (PDT) X-Google-Smtp-Source: APiQypK1A8GcpCmxj7zds5kW3dZpINTRDD1SfO0D6j1r9Eamuq2YY6HrhTDqJSVvPFLIixDM1RsP X-Received: by 2002:a50:eb8b:: with SMTP id y11mr2277383edr.229.1588164740654; Wed, 29 Apr 2020 05:52:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588164740; cv=none; d=google.com; s=arc-20160816; b=MbCz2cNo1S1eM1FhjByYBwlIAl7R7vLavscxpY+gFQ70/EhfYXq2Ayy5GgbHNIn4yu Q76e8N82kEGDvBZyCPDJab71TXSGsAQcnEPMSyWmtwDQgz0FJux8JzJzLxuQAKqI2rOm W/f38GN3VRTcV+WWfIeNq8IvkEsGZ2zL7qpQRnvd+wZm71CM5w5lMg3hHAAzZcjxbeXj 72InVB6eq+efNh9Vb9n1a2sBJ4c73en/LfgeY5Ie5GcLKXGJXfGbBnyUtqkgbfTCTmNE xDu3H+0SaeV15JoQW2aIRLNrJrN6hOWueR/oXtECoElwSdgAGE32S/Kh23CUNR5HZFKx 7ivQ== 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=CVIfLjMTComKtiWrKQL1uRv6fpDahWAnNV4OKM4xXI5aVyqgSYEYRKdmUiQ60giJTL KLCClZaE4u3OeahmZvSkZM9EpqeAHNhxFq9Bf2BG/ydCNiDw8Tho5xtyWhqECWJTV/Fy t+2VlgT6pwHsXiIqoHQKw3Sr4tQT4twmfohiEWFb5TT1q3iQfL4ifFuJ4/DYTE5hnoRw 5gR/mdCYJf98GAg4eowZxHMqJkhGQvyotn6yNzlI27tyx1KFpTjT2DPVOVn75ecYk8XL ESSmQKpqrqjyfprIjMy17l/jLoG2tl+Dzm2ceTc0UbosnmbIn6xynZcxJEBdTN7ewQzU Os2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=LHo8vhWL; 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 gr24si3809637ejb.162.2020.04.29.05.51.56; Wed, 29 Apr 2020 05:52:20 -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=LHo8vhWL; 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 S1726968AbgD2Msv (ORCPT + 99 others); Wed, 29 Apr 2020 08:48:51 -0400 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:18277 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726635AbgD2Msv (ORCPT ); Wed, 29 Apr 2020 08:48:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1588164531; x=1619700531; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=b5EEY//uUmxww4MeXLoOfsSYKFHirbB/BqQ/qTWvUzg=; b=LHo8vhWLLfHSkruRyRhheaksSZ+ZVYrlIORg0tmFVF1xNlEFQj+iKIEw U5IlqYEVY8uNKgP3J+YipKFrfObhNfYjzgojmDFnBM0CfjA0fwIMwByG5 KGZmsZPOSEfuudZp3vMK0GJ/U5JMBhfoOe+XXf3j7EQTSjgAwuds223tS Q=; IronPort-SDR: PPL5Sd98IMr78gOsnIoF/Z4FvUBvdVJl6caVRww7kqkXBQIMNQiq2++uLgY+8mEtgPw5ukRI/F /RvAJdG3MN3Q== X-IronPort-AV: E=Sophos;i="5.73,332,1583193600"; d="scan'208";a="40199891" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1e-97fdccfd.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 29 Apr 2020 12:48:47 +0000 Received: from EX13MTAUEA002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1e-97fdccfd.us-east-1.amazon.com (Postfix) with ESMTPS id 81074A21A1; Wed, 29 Apr 2020 12:48:35 +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, 29 Apr 2020 12:48:34 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.162.200) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 29 Apr 2020 12:48:18 +0000 From: SeongJae Park To: CC: SeongJae Park , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [RFC v7 6/7] mm/damon/selftests: Add 'schemes' debugfs tests Date: Wed, 29 Apr 2020 14:45:39 +0200 Message-ID: <20200429124540.32232-7-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200429124540.32232-1-sjpark@amazon.com> References: <20200429124540.32232-1-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.162.200] X-ClientProxiedBy: EX13D06UWC004.ant.amazon.com (10.43.162.97) 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