xref: /kernel/linux/linux-6.6/tools/testing/selftests/user/test_user_copy.sh
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/tools/testing/selftests/user/
162306a36Sopenharmony_ci#!/bin/sh
262306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
362306a36Sopenharmony_ci# Runs copy_to/from_user infrastructure using test_user_copy kernel module
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci# Kselftest framework requirement - SKIP code is 4.
662306a36Sopenharmony_ciksft_skip=4
762306a36Sopenharmony_ci
862306a36Sopenharmony_ciif ! /sbin/modprobe -q -n test_user_copy; then
962306a36Sopenharmony_ci	echo "user: module test_user_copy is not found [SKIP]"
1062306a36Sopenharmony_ci	exit $ksft_skip
1162306a36Sopenharmony_cifi
1262306a36Sopenharmony_ciif /sbin/modprobe -q test_user_copy; then
1362306a36Sopenharmony_ci	/sbin/modprobe -q -r test_user_copy
1462306a36Sopenharmony_ci	echo "user_copy: ok"
1562306a36Sopenharmony_cielse
1662306a36Sopenharmony_ci	echo "user_copy: [FAIL]"
1762306a36Sopenharmony_ci	exit 1
1862306a36Sopenharmony_cifi
19

Indexes created Thu Nov 07 10:32:03 CST 2024