Hi!
> dmesg can rotate and number of found bugs can actually go down,
> clear the buffer before test to avoid this
> 
> Signed-off-by: Jan Stancek <[email protected]>
> ---
>   .../controllers/cgroup/cgroup_regression_test.sh   |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
> 
> 
> 

> diff --git a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh 
> b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
> index 878f91a..5615053 100755
> --- a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
> +++ b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
> @@ -40,6 +40,7 @@ elif [ "x$(id -ru)" != x0 ]; then
>       exit 0
>  fi
>  
> +dmesg -c > /dev/null
>  nr_bug=`dmesg | grep -c "kernel BUG"`
>  nr_null=`dmesg | grep -c "kernel NULL pointer dereference"`
>  nr_warning=`dmesg | grep -c "^WARNING"`
> @@ -78,6 +79,8 @@ check_kernel_bug()
>       nr_warning=$new_warning
>       nr_lockdep=$new_lockdep
>  
> +     echo "check_kernel_bug found something!"
> +     dmesg
>       failed=1
>       return 0
>  }

Applied, but with the 'dmesg -c' the test could be simplified as storing
number of bugs in log at the start is meaningless now as it's most
likely 0.

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to