Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1579408rdd; Thu, 11 Jan 2024 03:36:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IH6kPFy25joWUopgCqIi0IN4SLnYc8WVpNaMwSw7zDiCUIiRU4ZBhb9Q8eNddhbm2iykffb X-Received: by 2002:a05:6808:3c86:b0:3bd:3bfe:4e3 with SMTP id gs6-20020a0568083c8600b003bd3bfe04e3mr1343140oib.79.1704972996733; Thu, 11 Jan 2024 03:36:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704972996; cv=none; d=google.com; s=arc-20160816; b=Lbr3o5F3V3GPWjKa6RM/UjyyRM7vZpb5CtA1Uk784QeF8d1uI7ZoU53QJjOyIBzsjU OYZKvLRiSA9dTor3fknCrnfJF38BNsHHk5qP4pZvHex/UnOrrJ2qHch7lDz0Ue4zlDj7 wURzEWKvbCRfLjgl45RZE2EgMXJ368XByG8th5BIAFYH5OhbCvNXRQxlquyu/XD2txTm fIhG0/PBYONk5yM6nr6mJ2pt9Rz27dJCzKhDpm/hxT6q8HygAZFrS9Mjn9hVq4jVQ0H2 2jfL2w1C15b6OzQtTAoQVMjwxarJMAEGul5UfP6CKwAYZDcYBUxtAT1RRQ5N88GPQ1X5 weJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=iPPOQuIOYQBpRPu4X3pwBKKMW0vGoctp7Ao6pEscFZs=; fh=+ZJgeVirBVvidjxmfL4pAjjWho6G1gVhHLd/Yb/Zi8I=; b=VRf9koWrX4GH0+0e3TuFNXIwUcZtJB6ondhJ5S+AOvkO+nWOT+vM5aH6seKA88EGWO SSeh8V+JmBEDmuVJzf7pNpGIoaBbnAjE3QQcG7zatuFUc1ZcKlw6izSRAEGQTaaDfFUc gMJVs+imj3KNcwyH88evcRK5lDT4QTiIqtMZRs3SSC4MzliFxD5BH+vOHOs8BGSPEcVV B168cb3ysEk89m554Gdrb5OCiPwdYSwWjD000wgINyZg+ZUX46BRibIBEITUPj87wGk0 xOzuJcjLBm0lTkGqbjMV4pDYHTCkVwZop+Zt6xal3jXSH2reUYb0pLQfdyoqn5Dpkko1 OrcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-23500-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23500-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b9-20020a0c9b09000000b0067f86df1ed8si599467qve.238.2024.01.11.03.36.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 03:36:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23500-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-23500-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23500-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4877D1C21F43 for ; Thu, 11 Jan 2024 11:36:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1450215488; Thu, 11 Jan 2024 11:36:26 +0000 (UTC) Received: from h3cspam02-ex.h3c.com (smtp.h3c.com [60.191.123.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2ED4E15493; Thu, 11 Jan 2024 11:36:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=h3c.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=h3c.com Received: from mail.maildlp.com ([172.25.15.154]) by h3cspam02-ex.h3c.com with ESMTP id 40BBZ9Z9081112; Thu, 11 Jan 2024 19:35:09 +0800 (GMT-8) (envelope-from hu.yadi@h3c.com) Received: from DAG6EX02-IMDC.srv.huawei-3com.com (unknown [10.62.14.11]) by mail.maildlp.com (Postfix) with ESMTP id CC870200AD20; Thu, 11 Jan 2024 19:39:31 +0800 (CST) Received: from localhost.localdomain (10.99.206.12) by DAG6EX02-IMDC.srv.huawei-3com.com (10.62.14.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1258.27; Thu, 11 Jan 2024 19:35:11 +0800 From: Hu Yadi To: , , , , CC: , , , , <514118380@qq.com>, "Hu.Yadi" Subject: [PATCH v4] selftests/move_mount_set_group:Make tests build with old libc Date: Thu, 11 Jan 2024 19:32:29 +0800 Message-ID: <20240111113229.10820-1-hu.yadi@h3c.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: BJSMTP02-EX.srv.huawei-3com.com (10.63.20.133) To DAG6EX02-IMDC.srv.huawei-3com.com (10.62.14.11) X-DNSRBL: X-SPAM-SOURCE-CHECK: pass X-MAIL:h3cspam02-ex.h3c.com 40BBZ9Z9081112 From: "Hu.Yadi" Replace SYS_ with __NR_. Using the __NR_ notation, provided by UAPI, is useful to build tests on systems without the SYS_ definitions. Replace SYS_move_mount with __NR_move_mount Similar changes: commit 87129ef13603 ("selftests/landlock: Make tests build with old libc") Acked-by: Mickaël Salaün Signed-off-by: Hu.Yadi Suggested-by: Jiao Reviewed-by: Berlin --- Changes v4 -> v3: - Adjust comments for consistent - Add Acked-by Changes v2 -> v3: - Adjust comments Changes v1 -> v2: - Fix mail of Suggested-by and Reviewed-by .../move_mount_set_group/move_mount_set_group_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c b/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c index 50ed5d475dd1..bcf51d785a37 100644 --- a/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c +++ b/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c @@ -218,7 +218,7 @@ static bool move_mount_set_group_supported(void) if (mount(NULL, SET_GROUP_FROM, NULL, MS_SHARED, 0)) return -1; - ret = syscall(SYS_move_mount, AT_FDCWD, SET_GROUP_FROM, + ret = syscall(__NR_move_mount, AT_FDCWD, SET_GROUP_FROM, AT_FDCWD, SET_GROUP_TO, MOVE_MOUNT_SET_GROUP); umount2("/tmp", MNT_DETACH); @@ -363,7 +363,7 @@ TEST_F(move_mount_set_group, complex_sharing_copying) CLONE_VM | CLONE_FILES); ASSERT_GT(pid, 0); ASSERT_EQ(wait_for_pid(pid), 0); - ASSERT_EQ(syscall(SYS_move_mount, ca_from.mntfd, "", + ASSERT_EQ(syscall(__NR_move_mount, ca_from.mntfd, "", ca_to.mntfd, "", MOVE_MOUNT_SET_GROUP | MOVE_MOUNT_F_EMPTY_PATH | MOVE_MOUNT_T_EMPTY_PATH), 0); -- 2.23.0