xref: /kernel/linux/linux-5.10/tools/testing/selftests/user/test_user_copy.sh
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/tools/testing/selftests/user/
18c2ecf20Sopenharmony_ci#!/bin/sh
28c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
38c2ecf20Sopenharmony_ci# Runs copy_to/from_user infrastructure using test_user_copy kernel module
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci# Kselftest framework requirement - SKIP code is 4.
68c2ecf20Sopenharmony_ciksft_skip=4
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ciif ! /sbin/modprobe -q -n test_user_copy; then
98c2ecf20Sopenharmony_ci	echo "user: module test_user_copy is not found [SKIP]"
108c2ecf20Sopenharmony_ci	exit $ksft_skip
118c2ecf20Sopenharmony_cifi
128c2ecf20Sopenharmony_ciif /sbin/modprobe -q test_user_copy; then
138c2ecf20Sopenharmony_ci	/sbin/modprobe -q -r test_user_copy
148c2ecf20Sopenharmony_ci	echo "user_copy: ok"
158c2ecf20Sopenharmony_cielse
168c2ecf20Sopenharmony_ci	echo "user_copy: [FAIL]"
178c2ecf20Sopenharmony_ci	exit 1
188c2ecf20Sopenharmony_cifi
19

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