Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'linux_kselftest-next-6.10-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull kselftest fixes from Shuah Khan:
"Revert 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"

* tag 'linux_kselftest-next-6.10-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
Revert "selftests/cgroup: Drop define _GNU_SOURCE"
Revert "selftests/sgx: Include KHDR_INCLUDES in Makefile"
Revert "selftests: Compile kselftest headers with -D_GNU_SOURCE"

+21 -5
+2 -2
tools/testing/selftests/Makefile
··· 170 170 # $(realpath ...) resolves symlinks 171 171 abs_objtree := $(realpath $(abs_objtree)) 172 172 BUILD := $(abs_objtree)/kselftest 173 - KHDR_INCLUDES := -D_GNU_SOURCE -isystem ${abs_objtree}/usr/include 173 + KHDR_INCLUDES := -isystem ${abs_objtree}/usr/include 174 174 else 175 175 BUILD := $(CURDIR) 176 176 abs_srctree := $(shell cd $(top_srcdir) && pwd) 177 - KHDR_INCLUDES := -D_GNU_SOURCE -isystem ${abs_srctree}/usr/include 177 + KHDR_INCLUDES := -isystem ${abs_srctree}/usr/include 178 178 DEFAULT_INSTALL_HDR_PATH := 1 179 179 endif 180 180
+3
tools/testing/selftests/cgroup/cgroup_util.c
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 + 3 + #define _GNU_SOURCE 4 + 2 5 #include <errno.h> 3 6 #include <fcntl.h> 4 7 #include <linux/limits.h>
+2
tools/testing/selftests/cgroup/test_core.c
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 + 3 + #define _GNU_SOURCE 2 4 #include <linux/limits.h> 3 5 #include <linux/sched.h> 4 6 #include <sys/types.h>
+2
tools/testing/selftests/cgroup/test_cpu.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 + 3 + #define _GNU_SOURCE 2 4 #include <linux/limits.h> 3 5 #include <sys/sysinfo.h> 4 6 #include <sys/wait.h>
+2
tools/testing/selftests/cgroup/test_hugetlb_memcg.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 + #define _GNU_SOURCE 3 + 2 4 #include <linux/limits.h> 3 5 #include <sys/mman.h> 4 6 #include <stdio.h>
+2
tools/testing/selftests/cgroup/test_kmem.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 + #define _GNU_SOURCE 3 + 2 4 #include <linux/limits.h> 3 5 #include <fcntl.h> 4 6 #include <stdio.h>
+2
tools/testing/selftests/cgroup/test_memcontrol.c
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 + #define _GNU_SOURCE 3 + 2 4 #include <linux/limits.h> 3 5 #include <linux/oom.h> 4 6 #include <fcntl.h>
+2
tools/testing/selftests/cgroup/test_zswap.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 + #define _GNU_SOURCE 3 + 2 4 #include <linux/limits.h> 3 5 #include <unistd.h> 4 6 #include <stdio.h>
+1 -1
tools/testing/selftests/kselftest_harness.h
··· 51 51 #define __KSELFTEST_HARNESS_H 52 52 53 53 #ifndef _GNU_SOURCE 54 - static_assert(0, "kselftest harness requires _GNU_SOURCE to be defined"); 54 + #define _GNU_SOURCE 55 55 #endif 56 56 #include <asm/types.h> 57 57 #include <ctype.h>
+1 -1
tools/testing/selftests/lib.mk
··· 67 67 endif 68 68 69 69 ifeq ($(KHDR_INCLUDES),) 70 - KHDR_INCLUDES := -D_GNU_SOURCE -isystem $(top_srcdir)/usr/include 70 + KHDR_INCLUDES := -isystem $(top_srcdir)/usr/include 71 71 endif 72 72 73 73 # In order to use newer items that haven't yet been added to the user's system
+1 -1
tools/testing/selftests/sgx/Makefile
··· 12 12 endif 13 13 14 14 INCLUDES := -I$(top_srcdir)/tools/include 15 - HOST_CFLAGS := -Wall -Werror $(KHDR_INCLUDES) -g $(INCLUDES) -fPIC 15 + HOST_CFLAGS := -Wall -Werror -g $(INCLUDES) -fPIC 16 16 HOST_LDFLAGS := -z noexecstack -lcrypto 17 17 ENCL_CFLAGS += -Wall -Werror -static-pie -nostdlib -ffreestanding -fPIE \ 18 18 -fno-stack-protector -mrdrnd $(INCLUDES)
+1
tools/testing/selftests/sgx/sigstruct.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* Copyright(c) 2016-20 Intel Corporation. */ 3 3 4 + #define _GNU_SOURCE 4 5 #include <assert.h> 5 6 #include <getopt.h> 6 7 #include <stdbool.h>