Skip to contentSkip to conversation

realtime: add realtime tests to the default

PATCH In review Xiaoguang Wang 2 participants 2 messages Oct 31, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 realtime: add realtime tests to the default

modify run.sh to check whether the kernel support RT PREEMPT

modify configure.ac to make the realtime tests default

---
 configure.ac                        | 10 ++++++----
 runtest/realtime                    |  1 +
 scenario_groups/default             |  1 +
 testcases/realtime/run.sh           | 20 ++++++++++++++++++++
 testcases/realtime/scripts/Makefile |  2 +-
 5 files changed, 29 insertions(+), 5 deletions(-)
 create mode 100644 runtest/realtime
configure.ac +6 -4
index 940f4f7..c4d63b4 100644
@@ -128,14 +128,16 @@ else
 fi
 
 # testcases/realtime requires bash and python.
-if test "x$with_bash" = xyes && test "x$with_python" = xyes; then
+AC_CHECK_PROG(bash_exist, bash, [yes], [no])
+AC_CHECK_PROG(python_exist, python, [yes], [no])
+if test "x$bash_exist" = xyes && test "x$python_exist" = xyes; then
     AC_ARG_WITH([realtime-testsuite],
-      [AC_HELP_STRING([--with-realtime-testsuite],
+      [AC_HELP_STRING([--without-realtime-testsuite],
         [compile and install the realtime testsuite (default=no)])],
-      [with_realtime_testsuite=yes]
+      [without_realtime_testsuite=yes],[without_realtime_testsuite=no]
     )
 fi
-if test "x$with_realtime_testsuite" = xyes; then
+if test "x$without_realtime_testsuite" = xno; then
     AC_SUBST([WITH_REALTIME_TESTSUITE],["yes"])
     # Run configure on testcases/realtime as well.
     AC_CONFIG_SUBDIRS([testcases/realtime])
runtest/realtime new file +1 -0
new file mode 100644
index 0000000..ca6023c
@@ -0,0 +1 @@
+realtime cd $LTPROOT/testcases/realtime/ && ./run.sh
scenario_groups/default +1 -0
index 9eca8ad..f29e817 100644
@@ -25,3 +25,4 @@ hugetlb
 commands
 hyperthreading
 kernel_misc
+realtime
testcases/realtime/run.sh +20 -0
index a66e4e5..e4943b6 100755
@@ -62,6 +62,17 @@ check_error()
 		exit 1
 	fi
 }
+
+check_kernel_config()
+{
+	local kernel_release=$(uname -r)
+	local config_file="/boot/config-${kernel_release}"
+
+	local is_exist=$(cat $config_file | grep "$1=y" -c)
+
+	return $is_exist
+}
+
 list_tests()
 {
 	echo
@@ -180,6 +191,15 @@ find_test()
 SCRIPTS_DIR="$(readlink -f "$(dirname "$0")")/scripts"
 source $SCRIPTS_DIR/setenv.sh
 
+# check whether the kernel support RT PREEMPT
+check_kernel_config "CONFIG_PREEMPT_RT"
+
+if [ $? -lt 1 ];then
+	echo "realtime      TCONF  Kernel don't support RT PREEMPT."
+	echo "see wiki <http://rt.wiki.kernel.org> for more information"
+	exit 0
+fi
+
 if [ $# -lt 1 ]; then
 	usage
 fi
testcases/realtime/scripts/Makefile +1 -1
index 28bf88e..5dda3a7 100644
@@ -22,5 +22,5 @@ top_srcdir		?= ../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
 include $(abs_srcdir)/../config.mk
-INSTALL_TARGETS		:= run_c_files.sh setenv.sh __init__.py parser.py
+INSTALL_TARGETS		:= run_all_test.sh run_c_files.sh setenv.sh __init__.py parser.py ../run.sh
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
Signature · 12 lines
1.8.2.1

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw

Hi!

Quoted 4 lines

modify run.sh to check whether the kernel support RT PREEMPT

modify configure.ac to make the realtime tests default

I do not like the realtime runtest file. The reason is that all the tests are executed by a single script, which makes it hard (if not impossible) to figure out what exactly has failed. We are working hard on getting rid of such runtest files. The runtest file should have only one entry per test.

Also adding it into the default scenario is IMHO not good choice, most of the systems out there are not RT systems.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list