|
Server : LiteSpeed System : Linux srv526460274 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : kerao9884 ( 1082) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /lib/modules/5.15.0-134-generic/build/tools/testing/selftests/media_tests/ |
Upload File : |
#!/bin/bash # SPDX-License-Identifier: GPL-2.0 # Media Device Allocator API test script # Copyright (c) 2019 Shuah Khan <shuah@kernel.org> echo "Media Device Allocator testing: unbind and bind" echo "media driver $1 audio driver $2" MDRIVER=/sys/bus/usb/drivers/$1 cd $MDRIVER MDEV=$(ls -d *\-*) ADRIVER=/sys/bus/usb/drivers/$2 cd $ADRIVER ADEV=$(ls -d *\-*.1) echo "==================================" echo "Test unbind both devices - start" echo "Running unbind of $MDEV from $MDRIVER" echo $MDEV > $MDRIVER/unbind; echo "Media device should still be present!" ls -l /dev/media* echo "sound driver is at: $ADRIVER" echo "Device is: $ADEV" echo "Running unbind of $ADEV from $ADRIVER" echo $ADEV > $ADRIVER/unbind; echo "Media device should have been deleted!" ls -l /dev/media* echo "Test unbind both devices - end" echo "==================================" echo "Test bind both devices - start" echo "Running bind of $MDEV from $MDRIVER" echo $MDEV > $MDRIVER/bind; echo "Media device should be present!" ls -l /dev/media* echo "Running bind of $ADEV from $ADRIVER" echo $ADEV > $ADRIVER/bind; echo "Media device should be there!" ls -l /dev/media* echo "Test bind both devices - end" echo "==================================" echo "Test unbind $MDEV - bind $MDEV - unbind $ADEV - bind $ADEV start" echo "Running unbind of $MDEV from $MDRIVER" echo $MDEV > $MDRIVER/unbind; echo "Media device should be there!" ls -l /dev/media* sleep 1 echo "Running bind of $MDEV from $MDRIVER" echo $MDEV > $MDRIVER/bind; echo "Media device should be there!" ls -l /dev/media* echo "Running unbind of $ADEV from $ADRIVER" echo $ADEV > $ADRIVER/unbind; echo "Media device should be there!" ls -l /dev/media* sleep 1 echo "Running bind of $ADEV from $ADRIVER" echo $ADEV > $ADRIVER/bind; echo "Media device should be there!" ls -l /dev/media* echo "Test unbind $MDEV - bind $MDEV - unbind $ADEV - bind $ADEV end" echo "=================================="