Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp887308ybt; Tue, 7 Jul 2020 02:44:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqRAs9Mgiah/kWcpVgyiA0AC5fm6mL76B02eydeESJENkzFZT9RliBpSL1ZLDY6KCXxT9d X-Received: by 2002:a17:906:dbed:: with SMTP id yd13mr45702617ejb.419.1594115057617; Tue, 07 Jul 2020 02:44:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594115057; cv=none; d=google.com; s=arc-20160816; b=lOUTNxVlms+EPDOBwGd2NruB+jw0OyKhyXLvhT9Yc7UsqPTqpy7JBE7RYmSL4auZ3y My0KkTD/niGME/+pIWoULaI6023I+FIG6YmkRsf8G+k2FMUk8SwjlayAKDV1NHzqJKtS GH2LTHIke0pCxtO9LgHfhDK5tuNssKQJa16xwm9BH8NmnspprMZ+ZE5T3BTSPVJTjZuI pyuH3J+JQ9/6OO7yi2f3FexKiFnUPFrggJ0mupYoSfp3TsLvu5B0hqNiRJgU+D1dGvxy cyuDNaXdOTSbPL/+YgBE69OGYNGnH/BTTIYMDTVViKeFoYO+Xff2V0A8jbzM1HO3v/GJ M9ww== 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=VLR9/lx9EbchB0oYciEE5z3iaWlatFovJxoC/dukz6uqaSOwwi9ODkptMo3Ut7tyU6 DWmZZ2IeV/JZg0y5gFhe72iqxWfDb4wt/OYQsRFAGt84UbLD6p7tUNn5fCzzK5MyKXED 4L/jCkcqxXBM8GdRmzX+MX+iH53fuEAn237PezCfIR9yw7i3mz1rT4G5TeB+nepyh4Yv uq2H33pfpQt6OlScJv8Nlj0WCIzbP+Awcxqlcx20FsQaSpfOQ1Qm+DYPTHPb66Se9V0x rrr2MboCeHxZKX+uBe2H729sDysn8Nwvgqzg2bzoLrIe8OS74nqDQJeZOwMSxFX7go6g 6Dqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=tx5dGIg2; 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 f6si15472666edv.159.2020.07.07.02.43.53; Tue, 07 Jul 2020 02:44:17 -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=tx5dGIg2; 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 S1726805AbgGGJlJ (ORCPT + 99 others); Tue, 7 Jul 2020 05:41:09 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:57213 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728067AbgGGJlI (ORCPT ); Tue, 7 Jul 2020 05:41:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1594114868; x=1625650868; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=b5EEY//uUmxww4MeXLoOfsSYKFHirbB/BqQ/qTWvUzg=; b=tx5dGIg29xFmwOcmKq/ye0XuWMxUbo+bYIpYQS5cU5gLKZ+Y2+jwgj8j IBgXDTBo5o3YI04VdNq2puhANk5HqiKPbNPOaJfQPDMoZe7FQ3TWGQYTs E/HzBQuEl9ZxKeh1+y/EgeREHLAaBr5wKOjk9q8QZlYvfeFrwICAnpCPv 0=; IronPort-SDR: eUbC0dxWWR6a6Uq2lfR55qBxbZNMOEaKxKwvLV5SwUGVKU273HDGEMcA2kYKiuW7VugHhSAjwM xzamPiVj7R8Q== X-IronPort-AV: E=Sophos;i="5.75,323,1589241600"; d="scan'208";a="56640673" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1d-f273de60.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 07 Jul 2020 09:41:05 +0000 Received: from EX13MTAUEA002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1d-f273de60.us-east-1.amazon.com (Postfix) with ESMTPS id A33CCA2109; Tue, 7 Jul 2020 09:40:52 +0000 (UTC) Received: from EX13D31EUA004.ant.amazon.com (10.43.165.161) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 7 Jul 2020 09:40:51 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.161.203) by EX13D31EUA004.ant.amazon.com (10.43.165.161) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 7 Jul 2020 09:40:35 +0000 From: SeongJae Park To: CC: SeongJae Park , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [RFC v13 6/8] mm/damon/selftests: Add 'schemes' debugfs tests Date: Tue, 7 Jul 2020 11:38:03 +0200 Message-ID: <20200707093805.4775-7-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200707093805.4775-1-sjpark@amazon.com> References: <20200707093805.4775-1-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.161.203] X-ClientProxiedBy: EX13D36UWA002.ant.amazon.com (10.43.160.24) To EX13D31EUA004.ant.amazon.com (10.43.165.161) 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