Changeset 37123 in vbox for trunk/src/VBox/Installer/linux/testcase/tstInstallerLinux.sh
- Timestamp:
- May 17, 2011 11:14:50 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/testcase/tstInstallerLinux.sh
r37120 r37123 22 22 echo "Testing udev rule generation for the \".run\" installer" 23 23 24 setup_test_input_install_udev ".run, udev-59" 59 25 26 udev_59_rules=`cat <<'UDEV_END' 27 KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660" 28 SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}" 29 SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}" 30 SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor" 31 SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor" 32 UDEV_END` 33 34 install_udev_output="`install_udev_run vboxusers 0660 /opt/VirtualBox`" 35 case "$install_udev_output" in 36 "$udev_59_rules") ;; 37 *) 38 echo "Bad output for udev version 59. Expected:" 39 echo "$udev_59_rules" 40 echo "Actual:" 41 echo "$install_udev_output" 42 CERRS="`expr "$CERRS" + 1`" 43 ;; 44 esac 45 46 cleanup_test_input_install_udev 47 24 48 setup_test_input_install_udev ".run, udev-55" 55 25 49 26 50 udev_55_rules=`cat <<'UDEV_END' 27 51 KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660" 28 SUBSYSTEM=="usb_device", ACTION=="add", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"29 SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"30 SUBSYSTEM=="usb_device", ACTION=="remove", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor"31 SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor"32 52 UDEV_END` 33 53 … … 50 70 udev_54_rules=`cat <<'UDEV_END' 51 71 KERNEL="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600" 52 SUBSYSTEM="usb_device", ACTION="add", RUN="/usr/lib/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"53 SUBSYSTEM="usb", ACTION="add", ENV{DEVTYPE}="usb_device", RUN="/usr/lib/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"54 SUBSYSTEM="usb_device", ACTION="remove", RUN="/usr/lib/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"55 SUBSYSTEM="usb", ACTION="remove", ENV{DEVTYPE}="usb_device", RUN="/usr/lib/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"56 72 UDEV_END` 57 73 … … 68 84 esac 69 85 86 cleanup_test_input_install_udev 87 70 88 echo "Testing udev rule generation for the \"package\" installer" 89 90 setup_test_input_install_udev "package, udev-59" 59 91 92 udev_59_rules=`cat <<'UDEV_END' 93 KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600" 94 SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers" 95 SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers" 96 SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" 97 SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" 98 UDEV_END` 99 100 install_udev_output="`install_udev_package vboxusers`" 101 case "$install_udev_output" in 102 "$udev_59_rules") ;; 103 *) 104 echo "Bad output for udev version 59. Expected:" 105 echo "$udev_59_rules" 106 echo "Actual:" 107 echo "$install_udev_output" 108 CERRS="`expr "$CERRS" + 1`" 109 ;; 110 esac 71 111 72 112 cleanup_test_input_install_udev … … 76 116 udev_55_rules=`cat <<'UDEV_END' 77 117 KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600" 78 SUBSYSTEM=="usb_device", ACTION=="add", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers"79 SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers"80 SUBSYSTEM=="usb_device", ACTION=="remove", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"81 SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"82 118 UDEV_END` 83 119 … … 100 136 udev_54_rules=`cat <<'UDEV_END' 101 137 KERNEL="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600" 102 SUBSYSTEM="usb_device", ACTION="add", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} root"103 SUBSYSTEM="usb", ACTION="add", ENV{DEVTYPE}="usb_device", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} root"104 SUBSYSTEM="usb_device", ACTION="remove", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"105 SUBSYSTEM="usb", ACTION="remove", ENV{DEVTYPE}="usb_device", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"106 138 UDEV_END` 107 139
Note:
See TracChangeset
for help on using the changeset viewer.