Message ID | 20241028233058.283381-4-sj@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21CA9D5B847 for <linux-mm@archiver.kernel.org>; Mon, 28 Oct 2024 23:31:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 071546B00B6; Mon, 28 Oct 2024 19:31:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F3A886B00BC; Mon, 28 Oct 2024 19:31:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D62C96B00BD; Mon, 28 Oct 2024 19:31:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id B10456B00B6 for <linux-mm@kvack.org>; Mon, 28 Oct 2024 19:31:10 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 73401407D4 for <linux-mm@kvack.org>; Mon, 28 Oct 2024 23:31:10 +0000 (UTC) X-FDA: 82724608890.14.791D3B4 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf13.hostedemail.com (Postfix) with ESMTP id 3FCC820025 for <linux-mm@kvack.org>; Mon, 28 Oct 2024 23:30:44 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=BYTIyDSi; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf13.hostedemail.com: domain of sj@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730158226; a=rsa-sha256; cv=none; b=3LKxirMymVdOLKMcM57+/kLR1tgNdANEoKTVUhowPsD6olxhx7NtBceztqzcKlLQEbxf9A qmUkxUk595rPCA+uDSUCe7CX/NyGOUS2YdXLgq57mauxOD8GA64zWhwZEZlNphAz+q0GEv 6V7Es9G3AYjDLqL0FqSrfGVVh8V+/n8= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=BYTIyDSi; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf13.hostedemail.com: domain of sj@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730158226; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9xzWwZXZURrnBHZXkRZ3OBM3LWbSDbPbe204eWj6zNk=; b=yYZrPLk0HdDtqRyl7PTiQ7j3/hr+8AQeQBMB+491+kPaqH7qKgHxpUtxkeCgY64QFxp/OU MWqXbwLmuCUr/RdMZfW30vvQAibPU6OmC8Uo/08Ds5B4u88JwPNQjpaDI2rGttP0xaqZLW j/hdh0E42WdYcvgdvkH6MxSzgnoDUg4= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 4D34FA402E1; Mon, 28 Oct 2024 23:29:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8D06C4CEE8; Mon, 28 Oct 2024 23:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730158268; bh=idVdmUJpd0kKngTICLupdXkDOcOuKWqMVDyDAZgda68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BYTIyDSi6xXgUW8HyyzmFDNShNtw1yPARHNH4+iwKE/ioypAD4Au97MUfw9t/f3wn dqisBPpIwXaVZb8AssUCwu2/nv8KS913DqCXg+Gk+CVZAP/us4MGSO84A573tivlzH aC21hEF53GSoRnTzeCJEuONfHBAuVcpf2xeZW4lIjKClH/EB6IwdorDKHvHlHzquoM JKTeMs/DzLjkD3cYpkDvB3hi+KskrlR1rrkMr+P1LAvNVB27iEJVG84Ir3nn1Krq5D /4pUSxYlO2gg6TrpETVbN2TIF3NGCH146rbbe4+Gx/nzc8eu6t/MmfDGd6as6qjdfd +NG1uNGNAI/1A== From: SeongJae Park <sj@kernel.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: SeongJae Park <sj@kernel.org>, Shuah Khan <shuah@kernel.org>, damon@lists.linux.dev, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] selftests/damon/_debugfs_common: hide expected error message from test_write_result() Date: Mon, 28 Oct 2024 16:30:55 -0700 Message-Id: <20241028233058.283381-4-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241028233058.283381-1-sj@kernel.org> References: <20241028233058.283381-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Stat-Signature: eodq7ieos8ggrnftp1cwjc4ris59uacx X-Rspamd-Queue-Id: 3FCC820025 X-Rspamd-Server: rspam02 X-HE-Tag: 1730158244-728214 X-HE-Meta: U2FsdGVkX1/TPm8Xe1Uo1GqUSl/Jc8BENJydtPQmMFGVO+/DJi8sYYJ4c+fSRdY641TDU603mZaByP0VrHObW+LHhoT2wpYKeON2RUCUY/TQiQr1z+zktqZq1+ht9qGB8uan4YeEJMuordH79aB1vTlwTk6Jlt1nzqSW9Y9zFqO6Bn5lmYyAVuOtg0L2LYGz0lD+4cTK4JbBW3tJtGRL94Pcn/y0foV2L/yeLqLu3a4VtmWNVuy26oZWVQPaSKx/eLjTDRfB1T4rCGD50yXIdR8lclRc8r6ciDNDXmHSEuugWTlM8E98En9X/mmWpuy9Xl5cx99hxGxZbNQsekfqbVKffDhC1McO+f+dHeEoihX8/9CgVK6DSPXPeePybpWQn/t7JRruQz5muzwqUcTkeyyqYx+M4z+ZJ1Ulz703Sa+3NsHAaRhwxOWuTv4PyqC8y36QuIuvn6nMc1rWAVlc6ssM8FfGSOOfLJGiDK8GQOBKw/iZ5+BzM9h4rEEFIPfyzJlXD9vTmuq3i8sXYKIUJXIITyg3D40/nPpWcUfJYnOK9tZJaVVW8qLew0N5zhKXJjUYXs3QWuI0vpzSooU58G3/jCgbKkoWpRDAEcBMk+xha+dlT+BvElOwxF7avfs5O33ccHm9NuvOwRDFM6uM18TSquznjGAB5G8n4tFXI7xo8TAMenO4NmRDj/K+wO6YPJXqmoxD6gpdnWSyO+MI2M+3dPFDA7Al6k72r4Npcs02LcIdBp9qOQ3IbrcnqJnJl24PkXM9vdUcLoBtCZe+RH8yOGkOQogBC3FlpNB1gMYcuY9ZPIeHEZ/xeSN3mJ7zFE/XxJjJ1b/4tAvfesPYD2dlTTDSLXHloyjGgjUoGx327hkDRIO2GM2uKnn5J5UJIKY2wCPZXxDpZPDv5iD2lCvjd52tTv41Etryd/LHQmXs+eNSTonR+zdofGe1br/hkUjchMVn0QqckAWA48x 5zubkcIO iS26hTUSBOCNT0Cr37sbrVMiTTpyjipp/4jv6w5KJjYBYBjeHv9MnVI+T+Fho53BZr4kUGmv7L5OjOkvHuBMzECHZ4tT+9zV8xupK/9kD1uWOdeWbdn420ArHq77Jkm738k1exz7tWwKjDNC3RG8muwW5zlI4b4Nnn+AhZb+t4OTkSfgzCnRWLoEWNG1MIq3HP87TGmvSaAoNnLD9R04xgw/XeA+U/atg0ZDWRsU4jSXX6l0USffSnTjTSzA1fOQqEPi/800esL9va1YS0xKRMmdEcg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000464, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
damon/{self,kunit}tests: minor fixups for DAMON debugfs interface tests
|
expand
|
diff --git a/tools/testing/selftests/damon/_debugfs_common.sh b/tools/testing/selftests/damon/_debugfs_common.sh index aa995516870b..54d45791b0d9 100644 --- a/tools/testing/selftests/damon/_debugfs_common.sh +++ b/tools/testing/selftests/damon/_debugfs_common.sh @@ -8,7 +8,12 @@ test_write_result() { expect_reason=$4 expected=$5 - echo "$content" > "$file" + if [ "$expected" = "0" ] + then + echo "$content" > "$file" + else + echo "$content" > "$file" 2> /dev/null + fi if [ $? -ne "$expected" ] then echo "writing $content to $file doesn't return $expected"
DAMON debugfs interface selftests use test_write_result() to check if valid or invalid writes to files of the interface success or fail as expected. File write error messages from expected failures are only making the output noisy. Hide such expected error messages. Fixes: b348eb7abd09 ("mm/damon: add user space selftests") Signed-off-by: SeongJae Park <sj@kernel.org> --- tools/testing/selftests/damon/_debugfs_common.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)