From patchwork Sun Feb 27 05:53:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengming Zhou X-Patchwork-Id: 12761537 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 966A8C433EF for ; Sun, 27 Feb 2022 05:53:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EE0DD8D001B; Sun, 27 Feb 2022 00:53:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E90EB8D0007; Sun, 27 Feb 2022 00:53:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DA6978D001B; Sun, 27 Feb 2022 00:53:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0061.hostedemail.com [216.40.44.61]) by kanga.kvack.org (Postfix) with ESMTP id CBF618D0007 for ; Sun, 27 Feb 2022 00:53:48 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 78B7A1812A441 for ; Sun, 27 Feb 2022 05:53:48 +0000 (UTC) X-FDA: 79187493336.24.13F4116 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by imf05.hostedemail.com (Postfix) with ESMTP id 8C9EC100002 for ; Sun, 27 Feb 2022 05:53:47 +0000 (UTC) Received: by mail-pf1-f179.google.com with SMTP id y11so8243904pfa.6 for ; Sat, 26 Feb 2022 21:53:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TgVfnSnXEcGoaDv3DM9kOZpMqyYLQA90eGzp4dL0JZs=; b=xlKJWjDoLItSB7uebqRIRgwMwUpLQQOwXuhT42MOPQetqYKz/r7jt+jDjrhmys+NIL bxQxutaG+4uSijCSwlTS7oSEYwAtfng3w3oj5UlsfifTCjW0gJHUPtLd3V5p76rIfygr JORzsALKtqbjIvDsXYe9V8iqZND4/COSCaIE4UO0IuXNV8rhSstCSPx2HlGPXojTdl1u P/+jy/GFhqtpdv/55b3cu3aw7Aslf8cytdFa6vnF7uGPT+o8wrNLJ7RDiggWufEIEIFC j0EWNsuONnYZwoquElZ2efYf7Twk4bRILvC9euEdM4ljA2xKlft33Jfr/BeiLsX44eW8 Mf5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TgVfnSnXEcGoaDv3DM9kOZpMqyYLQA90eGzp4dL0JZs=; b=Ocqr/yGhKj8b9lQV8zRknVC/RIR61IP+bXSCxew/iLK8BbYcZjvihR6Xzh6uS1fkQq f5LGEiyQM94WU8B65JxBOgzxxIVm1ogyGs9SRI/MF4ZhDc/JU775aCuU/ofoQgXZTkwi wqzZmU8DEVxWdcxdVTiaKgYxG4tMaFnjhva7+Tny9O/xas0oLCBpgrruORY7qHkhdnxq GP643sCNM6oKFjpNSdF92MnQS0E+Ie7NP1Tz8aWJSACfRF0lkjzfVB3k3lLPdZ3KssKB rO3yvuUGdYNslkq1X4T6WMl+YFKPNSZQsd+QLF/bumTE9Qd9NeY5djj15tiXWJN8BCJH k8yg== X-Gm-Message-State: AOAM533/pWu8oVETH/Bj+N5TosIpibiPGs6sLOodbs64sCLanqCn3Qhl ujRRMW6yRb/ddG99n/NBzQwMsQ== X-Google-Smtp-Source: ABdhPJxHmaiHTqexFilShO5HJEJVx7LP+GAmBpsTaYXG7tCaWA4m/pC02xRsznsBkb4gN39hYBDvmA== X-Received: by 2002:aa7:9902:0:b0:4e1:375c:99f6 with SMTP id z2-20020aa79902000000b004e1375c99f6mr15482327pff.44.1645941226266; Sat, 26 Feb 2022 21:53:46 -0800 (PST) Received: from localhost.localdomain ([2409:8a28:e6f:a720:d522:416f:1b2a:d253]) by smtp.gmail.com with ESMTPSA id j9-20020a056a00234900b004f3b1c23497sm8547647pfj.101.2022.02.26.21.53.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Feb 2022 21:53:45 -0800 (PST) From: Chengming Zhou To: akpm@linux-foundation.org, shuah@kernel.org Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Chengming Zhou Subject: [PATCH 1/2] kselftest/vm: override TARGETS from arguments Date: Sun, 27 Feb 2022 13:53:29 +0800 Message-Id: <20220227055330.43087-1-zhouchengming@bytedance.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 8C9EC100002 X-Stat-Signature: bm3a8zj6zg3drfs4xp7k1f7hns9fnu4d Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=xlKJWjDo; spf=pass (imf05.hostedemail.com: domain of zhouchengming@bytedance.com designates 209.85.210.179 as permitted sender) smtp.mailfrom=zhouchengming@bytedance.com; dmarc=pass (policy=none) header.from=bytedance.com X-Rspam-User: X-HE-Tag: 1645941227-398319 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000234, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: We can specify which testcases to build using TARGETS argument, for example: make -C tools/testing/selftests TARGETS=vm, cause the ordinary assignment of TARGETS in Makefile will be ignored. So we need to use override directive to change that. Signed-off-by: Chengming Zhou --- tools/testing/selftests/vm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile index 1607322a112c..0b330a5b1840 100644 --- a/tools/testing/selftests/vm/Makefile +++ b/tools/testing/selftests/vm/Makefile @@ -53,7 +53,7 @@ CAN_BUILD_I386 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_32bit_progra CAN_BUILD_X86_64 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_64bit_program.c) CAN_BUILD_WITH_NOPIE := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_program.c -no-pie) -TARGETS := protection_keys +override TARGETS := protection_keys BINARIES_32 := $(TARGETS:%=%_32) BINARIES_64 := $(TARGETS:%=%_64) From patchwork Sun Feb 27 05:53:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chengming Zhou X-Patchwork-Id: 12761538 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 319CBC433FE for ; Sun, 27 Feb 2022 05:53:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 98A6E8D001C; Sun, 27 Feb 2022 00:53:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 939338D0007; Sun, 27 Feb 2022 00:53:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 82B798D001C; Sun, 27 Feb 2022 00:53:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 738FB8D0007 for ; Sun, 27 Feb 2022 00:53:50 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 483BB6016C for ; Sun, 27 Feb 2022 05:53:50 +0000 (UTC) X-FDA: 79187493420.05.F44CE5A Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by imf28.hostedemail.com (Postfix) with ESMTP id CD816C0003 for ; Sun, 27 Feb 2022 05:53:49 +0000 (UTC) Received: by mail-pl1-f173.google.com with SMTP id z2so8119341plg.8 for ; Sat, 26 Feb 2022 21:53:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TBvazhbiMSJHiFRR8rtsztnvbns4XgMHNyrmX4NjfhY=; b=JS6dGDwtp+g07D0ANKPKJloW3mTpltjYKKF/C4VxIAMQNqjXMU/DzJXXFiml4noxZl YHuS0iHlT3Dw+BzkgR4x//1nRwt4l7Io+GX3Fz/ZAsMy2Z5t31/beYFSlaSftJsoisRt DTeOEdZHWvV+DuLOVOVXg5x01+p5ToBEsq2Oyi+NRCPpTXSAqmcJ11aCtQHsqcr6laO/ ZP/lndswMYzxN2FYKU1Ha8tiV7QW51mloOdszdoklbhq4BnC14o0qWBd6/wtz5kPygxz 0fsrdH2xg9G/zWjugpIu4+V5vfNXilxqI7dFAQYM41dlKhKadhHu8ORXvoxAOPEBHoMX pCzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TBvazhbiMSJHiFRR8rtsztnvbns4XgMHNyrmX4NjfhY=; b=v3oT7BDiwKmbzSHQ60cKOb9/irW9dXVPQl0+U/tkdnWfg0poYVvquqzZdFEb5zsln/ V4hO+S8WgbKyfkZGpGMnlv1jshZPftW5ejk9Dj5vzOiRVWcWjSHPfUhaf+xMLHqDHz3l eqKd/M4+XiwyydPucqeXmG2AvQLRqGjgC/4wVglOvvgbshU7HOpBx5EsvG/Awnas2RrU xRIfblf+rNkLuDdZ/jed6Pl4E14c74UHNLiaEHmWa80sAsz95Uk5wgmHt9cXvoOqb4xt 0dw5s8nMdHiJvS3QKt/BJcqRmiMk7B++jkS5Zzq2XxpchQ8sJgVq8z0QhP7N2Nkl2Ktd RHTw== X-Gm-Message-State: AOAM530vdTCBwgQteqo0ndBTWiWVdqyLA2pFanYnosmIlfl5LoNqhFRa S1bic62q6lxcd4QD4/NcZ27ayw== X-Google-Smtp-Source: ABdhPJwApFx8t+Bs5NDGGq+radi7MKoxi719NQVN5s+mt2a3EiPcLw4wD1OW5kBIeQ685vC1I4Pf4A== X-Received: by 2002:a17:90a:bb8d:b0:1bc:72a9:a07d with SMTP id v13-20020a17090abb8d00b001bc72a9a07dmr10705858pjr.9.1645941228842; Sat, 26 Feb 2022 21:53:48 -0800 (PST) Received: from localhost.localdomain ([2409:8a28:e6f:a720:d522:416f:1b2a:d253]) by smtp.gmail.com with ESMTPSA id j9-20020a056a00234900b004f3b1c23497sm8547647pfj.101.2022.02.26.21.53.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Feb 2022 21:53:48 -0800 (PST) From: Chengming Zhou To: akpm@linux-foundation.org, shuah@kernel.org Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Chengming Zhou Subject: [PATCH 2/2] kselftest/vm: fix tests build with old libc Date: Sun, 27 Feb 2022 13:53:30 +0800 Message-Id: <20220227055330.43087-2-zhouchengming@bytedance.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220227055330.43087-1-zhouchengming@bytedance.com> References: <20220227055330.43087-1-zhouchengming@bytedance.com> MIME-Version: 1.0 X-Rspamd-Server: rspam10 X-Rspam-User: X-Stat-Signature: r1ju5dtf3kawxsc6put1769f9kn783p5 Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=JS6dGDwt; spf=pass (imf28.hostedemail.com: domain of zhouchengming@bytedance.com designates 209.85.214.173 as permitted sender) smtp.mailfrom=zhouchengming@bytedance.com; dmarc=pass (policy=none) header.from=bytedance.com X-Rspamd-Queue-Id: CD816C0003 X-HE-Tag: 1645941229-667578 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000025, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The error message when I build vm tests on debian10 (GLIBC 2.28): userfaultfd.c: In function ‘userfaultfd_pagemap_test’: userfaultfd.c:1393:37: error: ‘MADV_PAGEOUT’ undeclared (first use in this function); did you mean ‘MADV_RANDOM’? if (madvise(area_dst, test_pgsize, MADV_PAGEOUT)) ^~~~~~~~~~~~ MADV_RANDOM This patch includes these newer definitions from UAPI linux/mman.h, is useful to fix tests build on systems without these definitions in glibc sys/mman.h. Signed-off-by: Chengming Zhou Reviewed-by: Shuah Khan --- tools/testing/selftests/vm/userfaultfd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c index 2f49c9af1b58..3fc1d2ee2948 100644 --- a/tools/testing/selftests/vm/userfaultfd.c +++ b/tools/testing/selftests/vm/userfaultfd.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include