Skip to contentSkip to conversation

selftests: core: include linux/close_range.h for CLOSE_RANGE_* macros

PATCH In review Muhammad Usama Anjum 1 participant 5 messages Oct 24, 2023 – Jan 23, 2024 Kselftest

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: core: include linux/close_range.h for CLOSE_RANGE_* macros

Correct header file is needed for getting CLOSE_RANGE_* macros. Previously it was tested with newer glibc which didn't show the need to include the header which was a mistake.

Fixes ec54424923cf ("selftests: core: remove duplicate defines")
---
 tools/testing/selftests/core/close_range_test.c | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/core/close_range_test.c +1 -0
index 534576f06df1c..c59e4adb905df 100644
@@ -12,6 +12,7 @@
 #include <syscall.h>
 #include <unistd.h>
 #include <sys/resource.h>
+#include <linux/close_range.h>
 
 #include "../kselftest_harness.h"
 #include "../clone3/clone3_selftests.h"
Signature · 1 line
2.42.0
#1 lore raw

Soft reminder

Quoted 24 lines · Muhammad Usama Anjum

Correct header file is needed for getting CLOSE_RANGE_* macros. Previously it was tested with newer glibc which didn't show the need to include the header which was a mistake.

Fixes ec54424923cf ("selftests: core: remove duplicate defines")
---
 tools/testing/selftests/core/close_range_test.c | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/core/close_range_test.c +1 -0
index 534576f06df1c..c59e4adb905df 100644
@@ -12,6 +12,7 @@
 #include <syscall.h>
 #include <unistd.h>
 #include <sys/resource.h>
+#include <linux/close_range.h>
 
 #include "../kselftest_harness.h"
 #include "../clone3/clone3_selftests.h"
Signature · 2 lines
BR,
Muhammad Usama Anjum
#2 lore raw

Soft reminder

Quoted 28 lines · Muhammad Usama Anjum

Soft reminder

Quoted 24 lines · Muhammad Usama Anjum

Correct header file is needed for getting CLOSE_RANGE_* macros. Previously it was tested with newer glibc which didn't show the need to include the header which was a mistake.

Fixes ec54424923cf ("selftests: core: remove duplicate defines")
---
 tools/testing/selftests/core/close_range_test.c | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/core/close_range_test.c +1 -0
index 534576f06df1c..c59e4adb905df 100644
@@ -12,6 +12,7 @@
 #include <syscall.h>
 #include <unistd.h>
 #include <sys/resource.h>
+#include <linux/close_range.h>
 
 #include "../kselftest_harness.h"
 #include "../clone3/clone3_selftests.h"
Signature · 2 lines
BR,
Muhammad Usama Anjum
#3 lore raw

Kind reminder

Quoted 32 lines · Muhammad Usama Anjum

Soft reminder

Quoted 28 lines · Muhammad Usama Anjum

Soft reminder

Quoted 24 lines · Muhammad Usama Anjum

Correct header file is needed for getting CLOSE_RANGE_* macros. Previously it was tested with newer glibc which didn't show the need to include the header which was a mistake.

Fixes ec54424923cf ("selftests: core: remove duplicate defines")
---
 tools/testing/selftests/core/close_range_test.c | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/core/close_range_test.c +1 -0
index 534576f06df1c..c59e4adb905df 100644
@@ -12,6 +12,7 @@
 #include <syscall.h>
 #include <unistd.h>
 #include <sys/resource.h>
+#include <linux/close_range.h>
 
 #include "../kselftest_harness.h"
 #include "../clone3/clone3_selftests.h"
Signature · 2 lines
BR,
Muhammad Usama Anjum
#4 lore raw
In reply to Muhammad Usama Anjum

Hi,

Can anybody please pick this patch? This was fixing genuine regression in some build system.

Thanks,

Quoted 24 lines · Muhammad Usama Anjum

Correct header file is needed for getting CLOSE_RANGE_* macros. Previously it was tested with newer glibc which didn't show the need to include the header which was a mistake.

Fixes ec54424923cf ("selftests: core: remove duplicate defines")
---
 tools/testing/selftests/core/close_range_test.c | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/core/close_range_test.c +1 -0
index 534576f06df1c..c59e4adb905df 100644
@@ -12,6 +12,7 @@
 #include <syscall.h>
 #include <unistd.h>
 #include <sys/resource.h>
+#include <linux/close_range.h>
 
 #include "../kselftest_harness.h"
 #include "../clone3/clone3_selftests.h"
Signature · 2 lines
BR,
Muhammad Usama Anjum