Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5990106pxb; Mon, 14 Feb 2022 12:31:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/f0J7D1R4OZAkweN6rwSkSmyVEIUf/5PVlTekE7IEHJpVXwo4PwzDLaA/GyNVvkpAc5+Y X-Received: by 2002:a17:902:b115:: with SMTP id q21mr553555plr.6.1644870713358; Mon, 14 Feb 2022 12:31:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644870713; cv=none; d=google.com; s=arc-20160816; b=N5j43hvExtVLDV/fRMpV8kclQFTAVwLerQ6xh2hiilefzNrbt+++kMkH/Yq/gVHtiK W2lYKsHXKlFUUOGjoNk2iNC/PTGQQPfcWChUxU3GqZRI5HnzgzMwuxqDc0lZjGGKeFfC DDZsGz78eIYOqxpQA7RuVoJhpsC0Wc0E8c1NHqrwzHu8MVX2EoRJkPKJnexvXZhl6hUK pzbXP2hy7ZV1v2VzJcVBuo2hIs+NNH3N2vioM2zY4+ZWvA72tYy5EjyxVHmBMIMn6XUN r/Ps5P5sK8GSxatHtNJCMLUc5nYY75kWCAMbsQTaEO393PK0JjJsJs3N4xhcys4R3N9P lDJQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=nPmXxbVcYDbSdAeZ8igRbhmsBqGhLAYRnBnpomTQskY=; b=ukz+NYt6CIwj5J/lkoDbA0t5Cx8HoLfKDsz0SeNMEHOnmaXh+KEhZNiCNS9Q6ipj2+ wy5NXiDs7bZty9iAr4bQLysAz112TG5o0bnrUrk3EArbXZJfORrjxXldJktNPU8ELEKi 56YflOfHXkUOpU7SuPJwLNoEb5m+oHNmn9RIVGnFeXm94dkdv/ZVSs6G6fopBcxaZpAJ orhyRFLxvf3uf3YDfVjlHINgL9mUmNZIsFeQcHIA8eIyV/nqoDmX8vRzw2Vux0BH7bTB n/BQCPQsCvccokOyWbCLYv3vKai+qAJVF6Vc3m+u0NN5BPn38uK0h/UQ9I1I8EYFa5GZ CtkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=U+cM9tRo; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 7si709343pgc.71.2022.02.14.12.31.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 12:31:53 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=U+cM9tRo; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1B2BCEA772; Mon, 14 Feb 2022 12:01:56 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356109AbiBNQIg (ORCPT + 99 others); Mon, 14 Feb 2022 11:08:36 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242693AbiBNQIe (ORCPT ); Mon, 14 Feb 2022 11:08:34 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA1B349F97; Mon, 14 Feb 2022 08:08:26 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id D303C1F43DBE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644854905; bh=aJsSEXf1LJvbiDXIpOJk5PLiUdc/g9YrvOrNGjI88oo=; h=From:To:Cc:Subject:Date:From; b=U+cM9tRoLy6qCMzSaQWPpmBDcHcYKhrWG1v0A85bD5Zm8cc+ytYZvtImj3axC+m1e veew8NkjIDmonpu7Dn92nl1J9Bqw84+6MVhVnSh1WIrIj3DF1pBW2StU+W5k7MtLyg usRG+e+t7rH7vlC8Ves0nswrY5bFVWjckrc3SVrzmKrjT129wNU4W1edIqIPYJSYdo W07xl5/Fdtxd3Y9Sm4D0nLyssLbdFzK2zTPFn5tq3NxUKABZKwmYMxS6RFuktlyncp EujRRhoeQU2ZWyfrya8Ha7lbNkNV7iY3mE8nL7jLld6ilYOY+HGiwpQEZE8AjdlMXB JqD9sKh+vZiMw== From: Muhammad Usama Anjum To: Shuah Khan Cc: Muhammad Usama Anjum , kernel@collabora.com, sherry.yang@oracle.com, keescook@chromium.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2] selftests: Use -isystem instead of -I to include headers Date: Mon, 14 Feb 2022 21:07:56 +0500 Message-Id: <20220214160756.3543590-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY 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 Selftests need kernel headers and glibc for compilation. In compilation of selftests, uapi headers from kernel source are used instead of default ones while glibc has already been compiled with different header files installed in the operating system. So there can be redefination warnings from compiler. These warnings can be suppressed by using -isystem to include the uapi headers. Signed-off-by: Muhammad Usama Anjum --- Changes in V2: Remove debug code --- tools/testing/selftests/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 4eda7c7c15694..06cc683f81b1a 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -130,11 +130,11 @@ ifneq ($(KBUILD_OUTPUT),) # $(realpath ...) resolves symlinks abs_objtree := $(realpath $(abs_objtree)) BUILD := $(abs_objtree)/kselftest - KHDR_INCLUDES := -I${abs_objtree}/usr/include + KHDR_INCLUDES := -isystem ${abs_objtree}/usr/include else BUILD := $(CURDIR) abs_srctree := $(shell cd $(top_srcdir) && pwd) - KHDR_INCLUDES := -I${abs_srctree}/usr/include + KHDR_INCLUDES := -isystem ${abs_srctree}/usr/include DEFAULT_INSTALL_HDR_PATH := 1 endif -- 2.30.2