summaryrefslogtreecommitdiff
path: root/scripts/qemuimage-tests/tools/dmesg.sh
blob: 66c022343b0130f5ee6d3dadf5943aa7a4014b11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# Dmesg test script running in QEMU
#
# Author: Jiajun Xu <jiajun.xu@intel.com>
#
# This file is licensed under the GNU General Public License,
# Version 2.
#

which dmesg
if [ $? -ne 0 ]; then
	echo "QEMU: No dmesg command found"
	exit 1
fi

dmesg | grep -iq "error"
if [ $? -eq 0 ]; then
	echo "QEMU: There is some error log in dmesg:"
	echo "QEMU: ##### Error Log ######"
	dmesg | grep -i "error"
	echo "QEMU: #####    End     ######"
	exit 1
else
	echo "QEMU: No error log in dmesg"
	exit 0
fi