brintos

brintos / linux-shallow public Read only

0
0
Text · 506 B · 6d08273 Raw
31 lines · bash
1#!/bin/sh2# SPDX-License-Identifier: GPL-2.03 4SRC_TREE=../../../../5 6test_run()7{8	if [ -f ${SRC_TREE}/drivers/char/adi.ko ]; then9		insmod ${SRC_TREE}/drivers/char/adi.ko 2> /dev/null10		if [ $? -ne 0 ]; then11			rc=112		fi13	else14		# Use modprobe dry run to check for missing adi module15		if ! /sbin/modprobe -q -n adi; then16			echo "adi: [SKIP]"17		elif /sbin/modprobe -q adi; then18			echo "adi: ok"19		else20			echo "adi: [FAIL]"21			rc=122		fi23	fi24	./adi-test25	rmmod adi 2> /dev/null26}27 28rc=029test_run30exit $rc31