Skip to content

Commit 70ec81c

Browse files
committed
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"
2 parents 72ece20 + a97853f commit 70ec81c

File tree

12 files changed

+21
-5
lines changed

12 files changed

+21
-5
lines changed

tools/testing/selftests/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ ifneq ($(KBUILD_OUTPUT),)
170170
# $(realpath ...) resolves symlinks
171171
abs_objtree := $(realpath $(abs_objtree))
172172
BUILD := $(abs_objtree)/kselftest
173-
KHDR_INCLUDES := -D_GNU_SOURCE -isystem ${abs_objtree}/usr/include
173+
KHDR_INCLUDES := -isystem ${abs_objtree}/usr/include
174174
else
175175
BUILD := $(CURDIR)
176176
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
178178
DEFAULT_INSTALL_HDR_PATH := 1
179179
endif
180180

tools/testing/selftests/cgroup/cgroup_util.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
#define _GNU_SOURCE
4+
25
#include <errno.h>
36
#include <fcntl.h>
47
#include <linux/limits.h>

tools/testing/selftests/cgroup/test_core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
#define _GNU_SOURCE
24
#include <linux/limits.h>
35
#include <linux/sched.h>
46
#include <sys/types.h>

tools/testing/selftests/cgroup/test_cpu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
2+
3+
#define _GNU_SOURCE
24
#include <linux/limits.h>
35
#include <sys/sysinfo.h>
46
#include <sys/wait.h>

tools/testing/selftests/cgroup/test_hugetlb_memcg.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
2+
#define _GNU_SOURCE
3+
24
#include <linux/limits.h>
35
#include <sys/mman.h>
46
#include <stdio.h>

tools/testing/selftests/cgroup/test_kmem.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
2+
#define _GNU_SOURCE
3+
24
#include <linux/limits.h>
35
#include <fcntl.h>
46
#include <stdio.h>

tools/testing/selftests/cgroup/test_memcontrol.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2+
#define _GNU_SOURCE
3+
24
#include <linux/limits.h>
35
#include <linux/oom.h>
46
#include <fcntl.h>

tools/testing/selftests/cgroup/test_zswap.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
2+
#define _GNU_SOURCE
3+
24
#include <linux/limits.h>
35
#include <unistd.h>
46
#include <stdio.h>

tools/testing/selftests/kselftest_harness.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
#define __KSELFTEST_HARNESS_H
5252

5353
#ifndef _GNU_SOURCE
54-
static_assert(0, "kselftest harness requires _GNU_SOURCE to be defined");
54+
#define _GNU_SOURCE
5555
#endif
5656
#include <asm/types.h>
5757
#include <ctype.h>

tools/testing/selftests/lib.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ MAKEFLAGS += --no-print-directory
6767
endif
6868

6969
ifeq ($(KHDR_INCLUDES),)
70-
KHDR_INCLUDES := -D_GNU_SOURCE -isystem $(top_srcdir)/usr/include
70+
KHDR_INCLUDES := -isystem $(top_srcdir)/usr/include
7171
endif
7272

7373
# In order to use newer items that haven't yet been added to the user's system

0 commit comments

Comments
 (0)