From patchwork Thu Jun 9 20:32:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Savitz X-Patchwork-Id: 12875953 Return-Path: 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 A21D7CCA473 for ; Thu, 9 Jun 2022 20:37:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CC8CA6B00EB; Thu, 9 Jun 2022 16:37:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C78036B00ED; Thu, 9 Jun 2022 16:37:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B192B6B00EE; Thu, 9 Jun 2022 16:37:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 9C7786B00EB for ; Thu, 9 Jun 2022 16:37:47 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 74428E13 for ; Thu, 9 Jun 2022 20:37:47 +0000 (UTC) X-FDA: 79559858574.07.53E8098 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf29.hostedemail.com (Postfix) with ESMTP id D819E120049 for ; Thu, 9 Jun 2022 20:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654807066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=PRwCAczOEs3oWB79ndk+TRrGu6B70/rR3Wnhg/0mT/M=; b=UPUrJ8rm+mYswySS1EhesqQGaLqGjpDs8I4VH9qutLrA2crnLBh0QCGhdwizgWSOKocHlp Aksy0IHBUscSzhHX3ZKfUf2mwrEmpge1ZqXnSgPSBs47f2DoI6QR5vzVTd2vCZvApfw6UN HIT5N9S5NkTdw+Lu46pU19NcdZoTYvQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-79-kvgtpqTPPj62Ir5KLx3dGQ-1; Thu, 09 Jun 2022 16:37:43 -0400 X-MC-Unique: kvgtpqTPPj62Ir5KLx3dGQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 90A4B80159B; Thu, 9 Jun 2022 20:37:42 +0000 (UTC) Received: from jsavitz-csb.redhat.com (unknown [10.22.11.108]) by smtp.corp.redhat.com (Postfix) with ESMTP id 434E71730C; Thu, 9 Jun 2022 20:37:42 +0000 (UTC) From: Joel Savitz To: linux-kernel@vger.kernel.org Cc: Joel Savitz , Andrew Morton , Shuah Khan , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, Nico Pache Subject: [PATCH] selftests: make use of GUP_TEST_FILE macro Date: Thu, 9 Jun 2022 16:32:17 -0400 Message-Id: <20220609203217.3206247-1-jsavitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1654807067; a=rsa-sha256; cv=none; b=tKnkaeYCH5oQYvrmKR5M1MT2cQRtN+IHvIwRhGCAAsX3ytkJZHjFrIavVVjpXCuHe78CmW b4XZfv9Xf3XJhliKnhLdEN7kt+CXDh0WeD27Ba+zTzeDfBCy0aSsh63zodEmTLfNSC9J1D 6g8yi/1cXls/Lwfxbn+IzEblqFvwHIQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1654807067; 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:references:dkim-signature; bh=PRwCAczOEs3oWB79ndk+TRrGu6B70/rR3Wnhg/0mT/M=; b=Hl1jDyM9+YLSZWvyHNOXlvOwnClARPnArmgsMpTwZDq5CMh47CKo7J7hIok21PWl/55EdZ KPlJumL/HcQ8y+l3dKyGbqQzA4+2v+fzueNkxZB2Tza5M7EjOP0MJrgIQQxAZPn6dzUUzf l+ihJ6YIlXptVhGvy1M9UsynE1gVKXg= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=UPUrJ8rm; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf29.hostedemail.com: domain of jsavitz@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=jsavitz@redhat.com Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=UPUrJ8rm; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf29.hostedemail.com: domain of jsavitz@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=jsavitz@redhat.com X-Stat-Signature: ajc3s7ura7418xbr9kacsyra1khjf117 X-Rspamd-Queue-Id: D819E120049 X-Rspamd-Server: rspam12 X-Rspam-User: X-HE-Tag: 1654807066-920519 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: Commit 17de1e559cf1 ("selftests: clarify common error when running gup_test") had most of its hunks dropped due to a conflict with another patch accepted into Linux around the same time that implemented the same behavior as a subset of other changes. However, the remaining hunk defines the GUP_TEST_FILE macro without making use of it. This patch makes use of the macro in the two relevant places. Furthermore, the above mentioned commit's log message erroneously describes the changes that were dropped from the patch. This patch corrects the record. Fixes: 17de1e559cf1 ("selftests: clarify common error when running gup_test") Signed-off-by: Joel Savitz Reviewed-by: Shuah Khan Acked-by: Nico Pache --- tools/testing/selftests/vm/gup_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/vm/gup_test.c b/tools/testing/selftests/vm/gup_test.c index 6bb36ca71cb5..a309876d832f 100644 --- a/tools/testing/selftests/vm/gup_test.c +++ b/tools/testing/selftests/vm/gup_test.c @@ -209,7 +209,7 @@ int main(int argc, char **argv) if (write) gup.gup_flags |= FOLL_WRITE; - gup_fd = open("/sys/kernel/debug/gup_test", O_RDWR); + gup_fd = open(GUP_TEST_FILE, O_RDWR); if (gup_fd == -1) { switch (errno) { case EACCES: @@ -224,7 +224,7 @@ int main(int argc, char **argv) printf("check if CONFIG_GUP_TEST is enabled in kernel config\n"); break; default: - perror("failed to open /sys/kernel/debug/gup_test"); + perror("failed to open " GUP_TEST_FILE); break; } exit(KSFT_SKIP);