VirtualBox

Changeset 84428 in vbox


Ignore:
Timestamp:
May 20, 2020 7:15:45 PM (5 years ago)
Author:
vboxsync
Message:

Validation Kit/tdAddBasic1.py: Some more ugly code for udev monitoring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/additions/tdAddBasic1.py

    r84427 r84428  
    206206            reporter.testDone();
    207207
     208            reporter.testStart('Enabling udev monitoring ...');
     209            sUdevMonitorServiceContent = \
     210                '[Unit]\n' \
     211                'Description=udev Monitoring\n' \
     212                'DefaultDependencies=no\n' \
     213                'Wants=systemd-udevd.service\n' \
     214                'After=systemd-udevd-control.socket systemd-udevd-kernel.socket\n' \
     215                'Before=sysinit.target systemd-udev-trigger.service\n' \
     216                '[Service]\n' \
     217                'Type=simple\n' \
     218                'ExecStart=/usr/bin/sh -c "/usr/sbin/udevadm monitor --udev --env > /tmp/udev_monitor.log\n' \
     219                '[Install]\n' \
     220                'WantedBy=sysinit.target';
     221            sUdevMonitorServiceFile = '/etc/systemd/system/systemd-udev-monitor.service';
     222            oTxsSession.syncUploadString(sUdevMonitorServiceContent, sUdevMonitorServiceFile, 0o644);
     223            oTxsSession.syncExec("/bin/systemctl", ("/bin/systemctl", "enable", "systemd-udev-monitor.service"),
     224                                 fIgnoreErrors = True);
     225            reporter.testDone();
     226
    208227        reporter.testStart('Waiting for TXS + CD (%s)' % (self.sFileCdWait,));
    209228        if oTestVm.isLinux():
     
    216235                                                                      sFileCdWait = self.sFileCdWait);
    217236        reporter.testDone();
     237
     238        if oTestVm.isLinux():
     239            asLogFiles = [ '/tmp/udev_monitor.log' ];
     240            self.txsDownloadFiles(oSession, oTxsSession, asLogFiles, fIgnoreErrors = True);
    218241
    219242        if oSession is not None:
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette