* [LTP] [PATCH 1/3] cgroup/memcg_regression_test: clear dmesg before test
@ 2011-09-19 7:49 Jan Stancek
0 siblings, 0 replies; only message in thread
From: Jan Stancek @ 2011-09-19 7:49 UTC (permalink / raw)
To: ltp-list
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
dmesg can rotate and number of found bugs can actually go down,
so clear the buffer before test to avoid this.
Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
.../memcg/regression/memcg_regression_test.sh | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
[-- Attachment #2: 0001-cgroup-memcg_regression_test-clear-dmesg-before-test.patch --]
[-- Type: text/x-patch, Size: 1034 bytes --]
diff --git a/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh b/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh
index b564ece..855b0fe 100755
--- a/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh
+++ b/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh
@@ -47,10 +47,13 @@ if [ $? -eq 0 ]; then
exit 0
fi
-nr_bug=`dmesg | grep -c "kernel BUG"`
-nr_null=`dmesg | grep -c "kernel NULL pointer dereference"`
-nr_warning=`dmesg | grep -c "^WARNING"`
-nr_lockdep=`dmesg | grep -c "possible recursive locking detected"`
+#buffer can rotate and number of found bugs can actually go down
+#so clear the buffer to avoid this
+dmesg -c > /dev/null
+nr_bug=0
+nr_null=0
+nr_warning=0
+nr_lockdep=0
# check_kernel_bug - check if some kind of kernel bug happened
check_kernel_bug()
@@ -85,6 +88,8 @@ check_kernel_bug()
nr_warning=$new_warning
nr_lockdep=$new_lockdep
+ echo "check_kernel_bug found something!"
+ dmesg
failed=1
return 0
}
[-- Attachment #3: Type: text/plain, Size: 369 bytes --]
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-09-19 7:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-19 7:49 [LTP] [PATCH 1/3] cgroup/memcg_regression_test: clear dmesg before test Jan Stancek
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.