1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3
4# Kselftest framework requirement - SKIP code is 4.
5ksft_skip=4
6
7# Runs bitmap infrastructure tests using test_bitmap kernel module
8if ! /sbin/modprobe -q -n test_bitmap; then
9	echo "bitmap: module test_bitmap is not found [SKIP]"
10	exit $ksft_skip
11fi
12
13if /sbin/modprobe -q test_bitmap; then
14	/sbin/modprobe -q -r test_bitmap
15	echo "bitmap: ok"
16else
17	echo "bitmap: [FAIL]"
18	exit 1
19fi
20