Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1652380pxm; Sat, 26 Feb 2022 22:40:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdPXarfGE/FgPRK+6pbpVIopWFBDz+6mSzBhGUn8jKb+xmG7wcVNTsoRGpOOfjqzrlPiCv X-Received: by 2002:a63:2f87:0:b0:374:4ebe:2048 with SMTP id v129-20020a632f87000000b003744ebe2048mr12504598pgv.157.1645944014915; Sat, 26 Feb 2022 22:40:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645944014; cv=none; d=google.com; s=arc-20160816; b=riKjKF5FTyWimJTCE0/xvcLK9O2eNkdQtPp9DgZTzA7gksgGZAd2KaknGyhuIyUCS0 JztQfJ9mg4xdGNb46UjU0hLI6Q6Z6e/8XPKgCD3BxNyW1eJbd2ddwP1SH0chXfIOfcR1 xc/9Xvqe3F5GYObDlAgeHgfqZPGsLA4iB7i85n0I+J+UDFVRl5tdsQOsNbN9br7lwK75 BxgRozHh8MDGt/RI4fAsWUsvcHPmfs9YsNteAV5M7aqC16+JSBbpOtqss/u5BAgaBxtZ uJ6t9+4jnT0OEFYlRPOGpUyuFPxiFjXmmw8KOInUOcCtsAPGkEbvPEaWR+Mnhiw2UgyF 1gxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TBvazhbiMSJHiFRR8rtsztnvbns4XgMHNyrmX4NjfhY=; b=KvMhZzNyWEcx0R599itTw9qKYFnUyFnCEKvswWLFqsR97mJbnH4Z00lW7P7IJmAZac CEPuM3mLWPZoWddPzAKHli+36n/WL6NyJb6yfsc9sywuSZ436M0d2gn8AKMinBEH0USr xnJwmhot1Ijr/r0hqJL4HEW3GzssJDU0Ea4wKVAApi2iPKqyclD8YVvVjpTqEmie7uQe MkNQo0rn88cfJ5GfRYgdDqfKg9x+IKwne6yLiGTa2voZreTx9AAqRZDhCxf0SHtC7z1J w3KwAwFi9fF3MxHoazLAN7iDbMpjBmKbgzWWE6QxL08kBeQUx2C/KU03hvKNjP5xLVMx Y1Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=JS6dGDwt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bt10-20020a17090af00a00b001bba88b5302si6093656pjb.50.2022.02.26.22.39.58; Sat, 26 Feb 2022 22:40:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=JS6dGDwt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230035AbiB0Fy2 (ORCPT + 99 others); Sun, 27 Feb 2022 00:54:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230032AbiB0FyY (ORCPT ); Sun, 27 Feb 2022 00:54:24 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5853610D5 for ; Sat, 26 Feb 2022 21:53:49 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id h17so2557646plc.5 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=nlB4YRzgRMHnaihxPzVy9c3Cqubpz3TLeEgk6kUaqRcUDfFIOTPHLknfwqtFT2vKdM ox6f4ke57OgBjUI0QovDqFEd9GWB/kYSdqDipA+2+MsghVTXjRC+kdVIqQhE+5y27Dgb Q72X65pV2w5mKRf/uqZleEEERvZ6vZkDTz+GASNHrh3Otgvype1MBBItIrmEXBADVGTX e3udmc/kPBJu62Y8fUYcHi2fEjBeSoyrLqb47EpbaV9Is6yw+mtHJxlJe5G8pD184DCP IagIIKyc/vJf3ESTR7ckK1/5ryG+0r8OtYUIbf+1/QruM/fjKuO3jepwCIP55MwN+GUe QvUA== X-Gm-Message-State: AOAM53294agZXNXGoyIMaQRrGhSQek3rb+gtvoxAQuoYbORUzgSMTD6f TPtjInYJ/2pAV8iC5m3N+DMEXw== 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FROM_FMBLA_NEWDOM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- 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 -- 2.20.1