Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp814603rdd; Tue, 9 Jan 2024 23:33:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IERhKOEqRMAjlZBrLOGJ/QL5iAORQ11cJSEqIy/z8Px8ktVeEoCWsQ3eGTBndzttxM8rOde X-Received: by 2002:a17:906:129b:b0:a22:eb96:6d3b with SMTP id k27-20020a170906129b00b00a22eb966d3bmr242358ejb.124.1704872030989; Tue, 09 Jan 2024 23:33:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704872030; cv=none; d=google.com; s=arc-20160816; b=F80MAzzNgFrmwTjX/7SVp0hh+0U+77hHtdQDi4Gyg3LVX4j9SF3VS0ZGzCsy8wrkT8 /ICrnTe7OQRyFJ6noqKipnINjbRFfJXi31DiTgUHZNBPRmBl0mjU37zUEgQsPS/DjUaE nN5/Tfqf85B8+LCr+NpS9/MYJ3Ja8KkBJplWm2lC0FZbgcRugOoECFTl3njrwu0FowCp rEv0WCQrjms33MknTlQFDgPjG9nQUjTzxA7q2LCh1PocsRC0DzLKqJ7m6oaZiPHiI8e6 hl1fNPjYmxf++EVtn2LnifGzfRiulPpTa7MsrWlzNfREL0skuvr/1FWLst3APKqVEnxd a0zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from; bh=Og1gMWkVGRmu0McQzzqjbOZfIoRrVYcvCCixtQtCC5g=; fh=Hl4Vgg1/izMUIy5pt/0TiUUe0cTCufrnuxTA+ifueIY=; b=Ro5+JwVf84RyiMQK3GNNRnE7O+hIXGpMAPOwA896mpS/nj0YIjt59gnH+emtZpUDu/ GAuqOPGnPrOzJE1vUYu1PEUv4cbkHzodU86676i3fsEXFZRKdabAadCJiAzenewF3EBj fC3wa9UXFYafxK755sFphAbNFWLiZDB1WummNt36TO/ACTUKjgQcXttwtONzBCL2Q/tY fn2I8Un3aeHrgv0ODFEE/7B9PswKVcqYYwn0wL06BSpBTsSM7VAZ39apyjygfoBxhX45 WW6G1IAtyo5fv5FsWB69qyVWWRdNIe0RRQGaqFYd92VBGgS4D/kDfwu/rKjh9fGvkRW2 TD8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-21793-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21793-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g4-20020a1709063b0400b00a26e35354casi1531515ejf.142.2024.01.09.23.33.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 23:33:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21793-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-21793-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21793-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B62EF1F27168 for ; Wed, 10 Jan 2024 07:33:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 791783A1A3; Wed, 10 Jan 2024 07:33:42 +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 AC43839ADE; Wed, 10 Jan 2024 07:33:37 +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 40A7VOOK014062; Wed, 10 Jan 2024 15:31:24 +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 C1E9D2004BA5; Wed, 10 Jan 2024 15:35:43 +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; Wed, 10 Jan 2024 15:31:24 +0800 From: Hu Yadi To: , , , , CC: , , , , <514118380@qq.com>, , "Hu.Yadi" Subject: [PATCH v2] selftests/move_mount_set_group:Make tests build with old libc Date: Wed, 10 Jan 2024 15:29:01 +0800 Message-ID: <20240110072901.5873-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 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 40A7VOOK014062 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 Signed-off-by: Hu.Yadi Suggested-by:Jiao Reviewed-by:Berlin --- 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