All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>, Andi Kleen <ak@suse.de>,
	Christoph Hellwig <hch@infradead.org>,
	sam@ravnborg.org, Arjan van de Ven <arjan@linux.intel.com>
Subject: [PATCH 7/8] Move backtrace tests to tests/
Date: Mon, 11 Feb 2008 16:21:45 +0530	[thread overview]
Message-ID: <20080211105145.GI7944@in.ibm.com> (raw)
In-Reply-To: <20080211104452.GB7944@in.ibm.com>

From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>

Move backtrace selftests to tests/

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
---
 kernel/backtracetest.c |   48 ------------------------------------------------
 kernel/Makefile        |    1 -
 lib/Kconfig.debug      |   12 ------------
 tests/Kconfig          |   12 ++++++++++++
 tests/Makefile         |    1 +
 tests/backtracetest.c  |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 61 insertions(+), 61 deletions(-)

Index: linux-2.6.25-rc1/kernel/Makefile
===================================================================
--- linux-2.6.25-rc1.orig/kernel/Makefile
+++ linux-2.6.25-rc1/kernel/Makefile
@@ -35,7 +35,6 @@ obj-$(CONFIG_KALLSYMS) += kallsyms.o
 obj-$(CONFIG_PM) += power/
 obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
 obj-$(CONFIG_KEXEC) += kexec.o
-obj-$(CONFIG_BACKTRACE_SELF_TEST) += backtracetest.o
 obj-$(CONFIG_COMPAT) += compat.o
 obj-$(CONFIG_CGROUPS) += cgroup.o
 obj-$(CONFIG_CGROUP_DEBUG) += cgroup_debug.o
Index: linux-2.6.25-rc1/kernel/backtracetest.c
===================================================================
--- linux-2.6.25-rc1.orig/kernel/backtracetest.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Simple stack backtrace regression test module
- *
- * (C) Copyright 2008 Intel Corporation
- * Author: Arjan van de Ven <arjan@linux.intel.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; version 2
- * of the License.
- */
-
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/delay.h>
-
-static struct timer_list backtrace_timer;
-
-static void backtrace_test_timer(unsigned long data)
-{
-	printk("Testing a backtrace from irq context.\n");
-	printk("The following trace is a kernel self test and not a bug!\n");
-	dump_stack();
-}
-static int backtrace_regression_test(void)
-{
-	printk("====[ backtrace testing ]===========\n");
-	printk("Testing a backtrace from process context.\n");
-	printk("The following trace is a kernel self test and not a bug!\n");
-	dump_stack();
-
-	init_timer(&backtrace_timer);
-	backtrace_timer.function = backtrace_test_timer;
-	mod_timer(&backtrace_timer, jiffies + 10);
-
-	msleep(10);
-	printk("====[ end of backtrace testing ]====\n");
-	return 0;
-}
-
-static void exitf(void)
-{
-}
-
-module_init(backtrace_regression_test);
-module_exit(exitf);
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Arjan van de Ven <arjan@linux.intel.com>");
Index: linux-2.6.25-rc1/lib/Kconfig.debug
===================================================================
--- linux-2.6.25-rc1.orig/lib/Kconfig.debug
+++ linux-2.6.25-rc1/lib/Kconfig.debug
@@ -466,18 +466,6 @@ config BOOT_PRINTK_DELAY
 	  BOOT_PRINTK_DELAY also may cause DETECT_SOFTLOCKUP to detect
 	  what it believes to be lockup conditions.
 
-config BACKTRACE_SELF_TEST
-	tristate "Self test for the backtrace code"
-	depends on DEBUG_KERNEL
-	default n
-	help
-	  This option provides a kernel module that can be used to test
-	  the kernel stack backtrace code. This option is not useful
-	  for distributions or general kernels, but only for kernel
-	  developers working on architecture code.
-
-	  Say N if you are unsure.
-
 config FAULT_INJECTION
 	bool "Fault-injection framework"
 	depends on DEBUG_KERNEL
Index: linux-2.6.25-rc1/tests/Kconfig
===================================================================
--- linux-2.6.25-rc1.orig/tests/Kconfig
+++ linux-2.6.25-rc1/tests/Kconfig
@@ -64,4 +64,16 @@ config KPROBES_SANITY_TEST
 
 	  Say N if you are unsure.
 
+config BACKTRACE_SELF_TEST
+	tristate "Self test for the backtrace code"
+	depends on DEBUG_KERNEL
+	default n
+	help
+	  This option provides a kernel module that can be used to test
+	  the kernel stack backtrace code. This option is not useful
+	  for distributions or general kernels, but only for kernel
+	  developers working on architecture code.
+
+	  Say N if you are unsure.
+
 endif # KERNEL_TESTS
Index: linux-2.6.25-rc1/tests/Makefile
===================================================================
--- linux-2.6.25-rc1.orig/tests/Makefile
+++ linux-2.6.25-rc1/tests/Makefile
@@ -7,3 +7,4 @@ obj-$(CONFIG_RCU_TORTURE_TEST) += rcutor
 obj-$(CONFIG_RT_MUTEX_TESTER) += rtmutex-tester.o
 obj-$(CONFIG_LKDTM) += lkdtm.o
 obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o
+obj-$(CONFIG_BACKTRACE_SELF_TEST) += backtracetest.o
Index: linux-2.6.25-rc1/tests/backtracetest.c
===================================================================
--- /dev/null
+++ linux-2.6.25-rc1/tests/backtracetest.c
@@ -0,0 +1,48 @@
+/*
+ * Simple stack backtrace regression test module
+ *
+ * (C) Copyright 2008 Intel Corporation
+ * Author: Arjan van de Ven <arjan@linux.intel.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; version 2
+ * of the License.
+ */
+
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/delay.h>
+
+static struct timer_list backtrace_timer;
+
+static void backtrace_test_timer(unsigned long data)
+{
+	printk("Testing a backtrace from irq context.\n");
+	printk("The following trace is a kernel self test and not a bug!\n");
+	dump_stack();
+}
+static int backtrace_regression_test(void)
+{
+	printk("====[ backtrace testing ]===========\n");
+	printk("Testing a backtrace from process context.\n");
+	printk("The following trace is a kernel self test and not a bug!\n");
+	dump_stack();
+
+	init_timer(&backtrace_timer);
+	backtrace_timer.function = backtrace_test_timer;
+	mod_timer(&backtrace_timer, jiffies + 10);
+
+	msleep(10);
+	printk("====[ end of backtrace testing ]====\n");
+	return 0;
+}
+
+static void exitf(void)
+{
+}
+
+module_init(backtrace_regression_test);
+module_exit(exitf);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Arjan van de Ven <arjan@linux.intel.com>");

  parent reply	other threads:[~2008-02-11 10:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 10:44 [PATCH 0/8] Create and populate toplevel tests/ for kernel tests Ananth N Mavinakayanahalli
2008-02-11 10:45 ` [PATCH 1/8] Create tests/ directory Ananth N Mavinakayanahalli
2008-02-11 10:46 ` [PATCH 2/8] Move locking selftests to tests/ Ananth N Mavinakayanahalli
2008-02-11 10:48 ` [PATCH 3/8] Move rcutorture " Ananth N Mavinakayanahalli
2008-02-11 10:49 ` [PATCH 4/8] Move rtmutex-tests " Ananth N Mavinakayanahalli
2008-02-11 10:50 ` [PATCH 5/8] Move lkdtm " Ananth N Mavinakayanahalli
2008-02-11 10:51 ` [PATCH 6/8] Move kprobes smoke tests " Ananth N Mavinakayanahalli
2008-02-11 10:51 ` Ananth N Mavinakayanahalli [this message]
2008-02-11 15:00   ` [PATCH 7/8] Move backtrace " Arjan van de Ven
2008-02-11 10:52 ` [PATCH 8/8] Move RODATA and NX " Ananth N Mavinakayanahalli
2008-02-11 14:42   ` Ingo Molnar
2008-02-11 15:49     ` Ananth N Mavinakayanahalli
2008-02-11 15:01   ` Arjan van de Ven
2008-02-11 18:26 ` [PATCH 0/8] Create and populate toplevel tests/ for kernel tests Randy Dunlap
2008-02-11 18:30   ` Randy Dunlap
2008-02-12 16:44 ` Christoph Hellwig
2008-02-12 21:22   ` Andrew Morton
2008-02-12 21:34     ` Arjan van de Ven
2008-02-12 22:39     ` [GIT PULL?] " Sam Ravnborg
2008-02-12 22:47       ` Arjan van de Ven
2008-02-14  7:47       ` Ingo Molnar
2008-02-19 19:21       ` Sam Ravnborg
2008-02-20 15:56         ` Ananth N Mavinakayanahalli
2008-02-22  3:42         ` Ananth N Mavinakayanahalli
2008-02-22  4:57           ` Stephen Rothwell
2008-02-22  5:03             ` Ananth N Mavinakayanahalli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080211105145.GI7944@in.ibm.com \
    --to=ananth@in.ibm.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sam@ravnborg.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.