From patchwork Mon May 20 17:34:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 13668518 Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1334113774C for ; Mon, 20 May 2024 17:34:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716226447; cv=none; b=hBcFTGUZpwBMIkX0kOFOJL+GHKcinlf0g6isdhMBFeBT99KvrB88FzL7d5CwyVVQDaBnR88AfePetbZOCj/GZ/v6a9NBQbBir5tDIQ+Yrc2eBuLXG7+0YoJkgZ5jGhuTe9VNppB25YJZatIbD9WU7QeS8kBYA2xxJJL/LJCucbs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716226447; c=relaxed/simple; bh=NXPQ88bUsMStJ3GNQoRlRoNhxcTjfI+OoR7ZxZiF5nM=; h=Content-Type:Message-ID:Date:MIME-Version:From:Subject:To:Cc; b=mNApn4YUJZe+H5pFF4+8WCsz8VHcrb0qHab7wXKQCpuaoYKvDH5zqO8rA8IeXnS2tWIkVhc43tqPWEHEhUG1IvFRAFMtiXqt6IO7r6CV+3yvgmClPlr8P6i6eohROqOzK2axhc1xJ4IO5H/4cuEyfq/juDLMOjiqBEPzTBV79G0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SDpN0vRM; arc=none smtp.client-ip=209.85.166.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="SDpN0vRM" Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-7e250c4158fso3838739f.0 for ; Mon, 20 May 2024 10:34:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1716226445; x=1716831245; darn=vger.kernel.org; h=cc:to:subject:from:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=We463djKM5gnWQMeK0z6Ah5wGS2hu7RTpVVmyvWnYUs=; b=SDpN0vRMpm23TTgBUYjzLmNVWfsSEGDAKfAdsTfKGH0nmdus/d8acp6yJTuiOdPcS5 4wk+fqILLoDOtsVWXh/GS82AsgO4guMSwywT50Jyko1SdxTIIJigEYVocURNN7pu2Fxf nef1m07eJnZDoKPcz4UB+2FljxdIYg+vAijQM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716226445; x=1716831245; h=cc:to:subject:from:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=We463djKM5gnWQMeK0z6Ah5wGS2hu7RTpVVmyvWnYUs=; b=DMP9bOGH3OGhiuQWx9T6DKTssf+j4WM0VFiar0HBtwdkEV5THzWnKsiBQMti/T6LN3 Lw6q1laTB82rTxJueVjh+nMamGmh+g8qpDmFPKpoyE21LWGPIKuIbYi1aiS/Ndj8nl1x GBdkNWqcyJRFpZX4NW7JTpTGM5AFbUTYZgCq2KYuH4ey5ggkFgDANKWB2JIojqY3tUde zVv9HDj9AOp5V4tMxy7dCp+q3skXBVQtrOzc0Lq+dRbspVvHkRSkw0HwY3AmiOykfa74 Z1dXpRF27Ljzf9NiHnBeiB/nitDHgSePzM2qmmKE5whWQt6lZFtikp0I1LcxKKMl7Z7e 7/FA== X-Forwarded-Encrypted: i=1; AJvYcCUYZVsSc/ZsyppCKAvMFZzcEyiuHGrSTBEnGmURNNNMoqI6tisletU/j1tJQOCEyRXKFmt7lhtOZRZDt7LxvoswP1EEfxIDWhvyabrX+EHJ X-Gm-Message-State: AOJu0YxwUqMIYUtuS3PNIAPpMEv9ALWfeLg6gy0K6OR0+SCxapX6Dob5 1/oKKrYp932RRsLRfEMi7TlxI6ZD7OUgOem9VE9a7CiT0MvtZ+q6h+tZSprGBc0kzwvKLFXDhfb D5P0= X-Google-Smtp-Source: AGHT+IHRerGd2Kn5X499MqlRWfZ5qBcq6NE0WiJXRgUFaOmfxaXfuBXsBnM7vw6NeyFIe0BEMH+vyw== X-Received: by 2002:a5e:c748:0:b0:7e1:d865:e700 with SMTP id ca18e2360f4ac-7e1d865e82emr2693219839f.2.1716226445121; Mon, 20 May 2024 10:34:05 -0700 (PDT) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-48960d727cesm5960273173.102.2024.05.20.10.34.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 May 2024 10:34:04 -0700 (PDT) Message-ID: <1eee575f-91fe-4da8-bd8f-8a8e44fcd4c7@linuxfoundation.org> Date: Mon, 20 May 2024 11:34:03 -0600 Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Shuah Khan Subject: [GIT PULL] Kselftest fixes for Linux 6.10-rc1 To: Linus Torvalds Cc: Mark Brown , Tejun Heo , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Edward Liaw , John Hubbard , Shuah Khan , shuah Hi Linus, Please pull this urgent kselftest fixes update for Linux 6.10-rc1. This kselftest fixes update for Linux 6.10-rc1 consists of reverts framework change to add D_GNU_SOURCE to KHDR_INCLUDES to Makefile, lib.mk, and kselftest_harness.h and follow-on changes to cgroup and sgx test as they are causing build failures and warnings. These three reverts have bee in next for a few days prior to a rebase before generating the pull request. diff for pull request is attached. thanks, -- Shuah ---------------------------------------------------------------- The following changes since commit ea5f6ad9ad9645733b72ab53a98e719b460d36a6: Merge tag 'platform-drivers-x86-v6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 (2024-05-16 09:14:50 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-next-6.10-rc1-fixes for you to fetch changes up to a97853f25b06f71c23b2d7a59fbd40f3f42d55ac: Revert "selftests/cgroup: Drop define _GNU_SOURCE" (2024-05-20 09:00:15 -0600) ---------------------------------------------------------------- linux_kselftest-next-6.10-rc1-fixes This kselftest fixes update for Linux 6.10-rc1 consists of reverts framework change to add D_GNU_SOURCE to KHDR_INCLUDES to Makefile, lib.mk, and kselftest_harness.h and follow-on changes to cgroup and sgx test as they are causing build failures and warnings. ---------------------------------------------------------------- Shuah Khan (3): Revert "selftests: Compile kselftest headers with -D_GNU_SOURCE" Revert "selftests/sgx: Include KHDR_INCLUDES in Makefile" Revert "selftests/cgroup: Drop define _GNU_SOURCE" tools/testing/selftests/Makefile | 4 ++-- tools/testing/selftests/cgroup/cgroup_util.c | 3 +++ tools/testing/selftests/cgroup/test_core.c | 2 ++ tools/testing/selftests/cgroup/test_cpu.c | 2 ++ tools/testing/selftests/cgroup/test_hugetlb_memcg.c | 2 ++ tools/testing/selftests/cgroup/test_kmem.c | 2 ++ tools/testing/selftests/cgroup/test_memcontrol.c | 2 ++ tools/testing/selftests/cgroup/test_zswap.c | 2 ++ tools/testing/selftests/kselftest_harness.h | 2 +- tools/testing/selftests/lib.mk | 2 +- tools/testing/selftests/sgx/Makefile | 2 +- tools/testing/selftests/sgx/sigstruct.c | 1 + 12 files changed, 21 insertions(+), 5 deletions(-) ---------------------------------------------------------------- diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index f0431e6cb67e..9039f3709aff 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -170,11 +170,11 @@ ifneq ($(KBUILD_OUTPUT),) # $(realpath ...) resolves symlinks abs_objtree := $(realpath $(abs_objtree)) BUILD := $(abs_objtree)/kselftest - KHDR_INCLUDES := -D_GNU_SOURCE -isystem ${abs_objtree}/usr/include + KHDR_INCLUDES := -isystem ${abs_objtree}/usr/include else BUILD := $(CURDIR) abs_srctree := $(shell cd $(top_srcdir) && pwd) - KHDR_INCLUDES := -D_GNU_SOURCE -isystem ${abs_srctree}/usr/include + KHDR_INCLUDES := -isystem ${abs_srctree}/usr/include DEFAULT_INSTALL_HDR_PATH := 1 endif diff --git a/tools/testing/selftests/cgroup/cgroup_util.c b/tools/testing/selftests/cgroup/cgroup_util.c index ce16a50ecff8..432db923bced 100644 --- a/tools/testing/selftests/cgroup/cgroup_util.c +++ b/tools/testing/selftests/cgroup/cgroup_util.c @@ -1,4 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ + +#define _GNU_SOURCE + #include #include #include diff --git a/tools/testing/selftests/cgroup/test_core.c b/tools/testing/selftests/cgroup/test_core.c index de8baad46022..a5672a91d273 100644 --- a/tools/testing/selftests/cgroup/test_core.c +++ b/tools/testing/selftests/cgroup/test_core.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ + +#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/cgroup/test_cpu.c b/tools/testing/selftests/cgroup/test_cpu.c index 5a4a314f6af7..dad2ed82f3ef 100644 --- a/tools/testing/selftests/cgroup/test_cpu.c +++ b/tools/testing/selftests/cgroup/test_cpu.c @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 + +#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/cgroup/test_hugetlb_memcg.c b/tools/testing/selftests/cgroup/test_hugetlb_memcg.c index 80d05d50a42d..856f9508ea56 100644 --- a/tools/testing/selftests/cgroup/test_hugetlb_memcg.c +++ b/tools/testing/selftests/cgroup/test_hugetlb_memcg.c @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 +#define _GNU_SOURCE + #include #include #include diff --git a/tools/testing/selftests/cgroup/test_kmem.c b/tools/testing/selftests/cgroup/test_kmem.c index 2e453ac50c0d..96693d8772be 100644 --- a/tools/testing/selftests/cgroup/test_kmem.c +++ b/tools/testing/selftests/cgroup/test_kmem.c @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 +#define _GNU_SOURCE + #include #include #include diff --git a/tools/testing/selftests/cgroup/test_memcontrol.c b/tools/testing/selftests/cgroup/test_memcontrol.c index c871630d62a3..41ae8047b889 100644 --- a/tools/testing/selftests/cgroup/test_memcontrol.c +++ b/tools/testing/selftests/cgroup/test_memcontrol.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ +#define _GNU_SOURCE + #include #include #include diff --git a/tools/testing/selftests/cgroup/test_zswap.c b/tools/testing/selftests/cgroup/test_zswap.c index 8418a8d7439f..fa571bfd2432 100644 --- a/tools/testing/selftests/cgroup/test_zswap.c +++ b/tools/testing/selftests/cgroup/test_zswap.c @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 +#define _GNU_SOURCE + #include #include #include diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h index 37b03f1b8741..3c8f2965c285 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -51,7 +51,7 @@ #define __KSELFTEST_HARNESS_H #ifndef _GNU_SOURCE -static_assert(0, "kselftest harness requires _GNU_SOURCE to be defined"); +#define _GNU_SOURCE #endif #include #include diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index 33c24ceddfb7..09e8a854f0fc 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -67,7 +67,7 @@ MAKEFLAGS += --no-print-directory endif ifeq ($(KHDR_INCLUDES),) -KHDR_INCLUDES := -D_GNU_SOURCE -isystem $(top_srcdir)/usr/include +KHDR_INCLUDES := -isystem $(top_srcdir)/usr/include endif # The following are built by lib.mk common compile rules. diff --git a/tools/testing/selftests/sgx/Makefile b/tools/testing/selftests/sgx/Makefile index 26ea30fae23c..867f88ce2570 100644 --- a/tools/testing/selftests/sgx/Makefile +++ b/tools/testing/selftests/sgx/Makefile @@ -12,7 +12,7 @@ OBJCOPY := $(CROSS_COMPILE)objcopy endif INCLUDES := -I$(top_srcdir)/tools/include -HOST_CFLAGS := -Wall -Werror $(KHDR_INCLUDES) -g $(INCLUDES) -fPIC +HOST_CFLAGS := -Wall -Werror -g $(INCLUDES) -fPIC HOST_LDFLAGS := -z noexecstack -lcrypto ENCL_CFLAGS += -Wall -Werror -static-pie -nostdlib -ffreestanding -fPIE \ -fno-stack-protector -mrdrnd $(INCLUDES) diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c index 200034a0fee5..d73b29becf5b 100644 --- a/tools/testing/selftests/sgx/sigstruct.c +++ b/tools/testing/selftests/sgx/sigstruct.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2016-20 Intel Corporation. */ +#define _GNU_SOURCE #include #include #include