* [PATCH] selftests: fix warning: "_GNU_SOURCE" redefined
@ 2018-10-11 19:53 Peng Hao
2018-10-16 14:53 ` Shuah Khan
0 siblings, 1 reply; 2+ messages in thread
From: Peng Hao @ 2018-10-11 19:53 UTC (permalink / raw)
To: shuah, akpm; +Cc: linux-kernel, linux-fsdevel, linux-kselftest, Peng Hao
Makefile contains -D_GNU_SOURCE. remove define "_GNU_SOURCE"
in c files.
Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
---
tools/testing/selftests/proc/fd-001-lookup.c | 2 +-
tools/testing/selftests/proc/fd-003-kthread.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/proc/fd-001-lookup.c b/tools/testing/selftests/proc/fd-001-lookup.c
index a2010df..60d7948 100644
--- a/tools/testing/selftests/proc/fd-001-lookup.c
+++ b/tools/testing/selftests/proc/fd-001-lookup.c
@@ -14,7 +14,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
// Test /proc/*/fd lookup.
-#define _GNU_SOURCE
+
#undef NDEBUG
#include <assert.h>
#include <dirent.h>
diff --git a/tools/testing/selftests/proc/fd-003-kthread.c b/tools/testing/selftests/proc/fd-003-kthread.c
index 1d659d5..dc591f9 100644
--- a/tools/testing/selftests/proc/fd-003-kthread.c
+++ b/tools/testing/selftests/proc/fd-003-kthread.c
@@ -14,7 +14,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
// Test that /proc/$KERNEL_THREAD/fd/ is empty.
-#define _GNU_SOURCE
+
#undef NDEBUG
#include <sys/syscall.h>
#include <assert.h>
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] selftests: fix warning: "_GNU_SOURCE" redefined
2018-10-11 19:53 [PATCH] selftests: fix warning: "_GNU_SOURCE" redefined Peng Hao
@ 2018-10-16 14:53 ` Shuah Khan
0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2018-10-16 14:53 UTC (permalink / raw)
To: Peng Hao, akpm; +Cc: linux-kernel, linux-fsdevel, linux-kselftest, Shuah Khan
On 10/11/2018 01:53 PM, Peng Hao wrote:
> Makefile contains -D_GNU_SOURCE. remove define "_GNU_SOURCE"
> in c files.
>
> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
> ---
> tools/testing/selftests/proc/fd-001-lookup.c | 2 +-
> tools/testing/selftests/proc/fd-003-kthread.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/proc/fd-001-lookup.c b/tools/testing/selftests/proc/fd-001-lookup.c
> index a2010df..60d7948 100644
> --- a/tools/testing/selftests/proc/fd-001-lookup.c
> +++ b/tools/testing/selftests/proc/fd-001-lookup.c
> @@ -14,7 +14,7 @@
> * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> */
> // Test /proc/*/fd lookup.
> -#define _GNU_SOURCE
> +
> #undef NDEBUG
> #include <assert.h>
> #include <dirent.h>
> diff --git a/tools/testing/selftests/proc/fd-003-kthread.c b/tools/testing/selftests/proc/fd-003-kthread.c
> index 1d659d5..dc591f9 100644
> --- a/tools/testing/selftests/proc/fd-003-kthread.c
> +++ b/tools/testing/selftests/proc/fd-003-kthread.c
> @@ -14,7 +14,7 @@
> * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> */
> // Test that /proc/$KERNEL_THREAD/fd/ is empty.
> -#define _GNU_SOURCE
> +
> #undef NDEBUG
> #include <sys/syscall.h>
> #include <assert.h>
>
Thanks for the patch. Applied to linux-kselftest next for 4.20-rc1.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-16 14:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-11 19:53 [PATCH] selftests: fix warning: "_GNU_SOURCE" redefined Peng Hao
2018-10-16 14:53 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).