summaryrefslogtreecommitdiffstats
path: root/dung-3.4.25-m2/common/proc-interrupts.sh
blob: 3e709a043a06a9141bba47456eac4a64d00ab65b (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
27
28
29
30
31
#!/bin/sh
# dmesg.sh
#
# Simple /proc/interrupts presence test
# 
# Copyright (C) 2013 Horms Soltutions Ltd.
#
# Contact: Simon Horman <horms@verge.net.au>
#
# 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.

set -e
#set -x

if [ $# -ne 1 ]; then
	echo "usage: $(basename $0) PATTERN" >& 2
	exit 1
fi

PATTERN="$1"

#echo "/proc/interrupts feature test for '$PATTERN'"

if ! grep "$PATTERN" /proc/interrupts; then
	echo "error: not matched" >&2 
	exit 1
fi

#echo "Test passed"