aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorPeng Hao <peng.hao2@zte.com.cn>2018-10-11 15:53:50 -0400
committerShuah Khan (Samsung OSG) <shuah@kernel.org>2018-10-24 16:49:37 -0400
commit0387662d1b6c5ad2950d8e94d5e380af3f15c05c (patch)
tree199c380e714b1890a3ae5ed92686bc4899b70232 /tools/testing
parentfb363e2d20351e1d16629df19e7bce1a31b3227a (diff)
selftests: fix warning: "_GNU_SOURCE" redefined
Makefile contains -D_GNU_SOURCE. remove define "_GNU_SOURCE" in c files. Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/proc/fd-001-lookup.c2
-rw-r--r--tools/testing/selftests/proc/fd-003-kthread.c2
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 a2010dfb2110..60d7948e7124 100644
--- a/tools/testing/selftests/proc/fd-001-lookup.c
+++ b/tools/testing/selftests/proc/fd-001-lookup.c
@@ -14,7 +14,7 @@
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */ 15 */
16// Test /proc/*/fd lookup. 16// Test /proc/*/fd lookup.
17#define _GNU_SOURCE 17
18#undef NDEBUG 18#undef NDEBUG
19#include <assert.h> 19#include <assert.h>
20#include <dirent.h> 20#include <dirent.h>
diff --git a/tools/testing/selftests/proc/fd-003-kthread.c b/tools/testing/selftests/proc/fd-003-kthread.c
index 1d659d55368c..dc591f97b63d 100644
--- a/tools/testing/selftests/proc/fd-003-kthread.c
+++ b/tools/testing/selftests/proc/fd-003-kthread.c
@@ -14,7 +14,7 @@
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */ 15 */
16// Test that /proc/$KERNEL_THREAD/fd/ is empty. 16// Test that /proc/$KERNEL_THREAD/fd/ is empty.
17#define _GNU_SOURCE 17
18#undef NDEBUG 18#undef NDEBUG
19#include <sys/syscall.h> 19#include <sys/syscall.h>
20#include <assert.h> 20#include <assert.h>