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: 12761535 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25187C433F5 for ; Sun, 27 Feb 2022 05:53:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230025AbiB0FyX (ORCPT ); Sun, 27 Feb 2022 00:54:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229981AbiB0FyW (ORCPT ); Sun, 27 Feb 2022 00:54:22 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B39C7B0B for ; Sat, 26 Feb 2022 21:53:46 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id l19so8250249pfu.2 for ; Sat, 26 Feb 2022 21:53:46 -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=P4L0mcAAwdtYdTEa3Z1qn0utrXaMCqopdj7W83xERrUvoRNOzPQqXlu+vmFpRLO1Dq vQXxB9zARXUO6FOjtfUhBnmb7qtxTCfeC7SbJgdjUvV7khwmHcmPbDr8X8CPfChEyBmM wBFJN4Nq+KEYFHsD7SOLjZsBoQ4hzIx3p3UmpiOUymuSM4mP5caxq0HQHpfcAsrgFKoh W+db6U+9zwBNYKBGYX7b485kJciH/0vNPCDa6MypeI3MuE+YYypicwVOdeOuqL6Zfv+2 ruIm44OLDHYcfDU7KmIPG/yeCLq2RI+c8MhytekB3HF7X3XkuzawNGbR+rD1SpxYqfZh iq5g== X-Gm-Message-State: AOAM532PCxFe68P76ctW9Dp+s1CmUH9vkxa4Hq5+yNap9EMZByPeBMaE 2CWAoFroxOvGiL+HDCoqioNmRg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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: 12761536 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9783C433EF for ; Sun, 27 Feb 2022 05:53:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229482AbiB0FyZ (ORCPT ); Sun, 27 Feb 2022 00:54:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230033AbiB0FyY (ORCPT ); Sun, 27 Feb 2022 00:54:24 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56F31B0B for ; Sat, 26 Feb 2022 21:53:49 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id c9so8164104pll.0 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=ID8aUtt8TfScEIkTeVU1EuB53359Jp9Eydds/wLwJTNENtDaug2bXI6Gj+Anmn0GoB kaXFbQVwY9JsGDRPIdeDDc/zEZcrhowNneOtn/4m64+HL/tFP/fxTlJV4jzSg7ynbOXf 8w+YGDVwxBY1brNoQO8/F0Ne/cxuMdIINDdK5bZiOC4UiyG7WnQTBERBNcgtdtporWlX LHXmH5MOe1YXnCQ5+GZLAt5AFyIcpWCKtOGYgOW0hBvZSwioI1mWQwW5Hh3lDrz9fvY8 TM2GrUlyRYQbymUyfviPsuGS6sjDF6ppq+F1x6JLnmzuKmVmLmUdddIxQV9F1ucFDkIz 2fAA== X-Gm-Message-State: AOAM5305CtmTju49RrKkv0VxmMnsUDnHXiveQN2SGjgHp2XYLbjEI5Cm oJFtoSRvtH/xE3UiWZN8vZvQLQ== 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 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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