VirtualBox

Changeset 94590 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 13, 2022 2:56:43 PM (3 years ago)
Author:
vboxsync
Message:

ValidationKit/testdriver/vbox.py: Introduce a mechanism for forgetting a VM, required for testing VM unregistering since otherwise the object refcount doesn't drop to 0, influencing the API behavior.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/vbox.py

    r94509 r94590  
    11281128                if not os.path.isfile(sGdb): sGdb = 'gdb';
    11291129                sGdbCmdLine = '%s --args %s --pidfile %s' % (sGdb, sVBoxSVC, self.sVBoxSvcPidFile);
     1130                # Cool tweak to run performance analysis instead of gdb:
     1131                #sGdb = '/usr/bin/valgrind';
     1132                #sGdbCmdLine = '%s --tool=callgrind --collect-atstart=no -- %s --pidfile %s' % (sGdb, sVBoxSVC, self.sVBoxSvcPidFile);
    11301133                reporter.log('term="%s" gdb="%s"' % (sTerm, sGdbCmdLine));
    11311134                os.environ['SHELL'] = self.sOrgShell; # Non-working shell may cause gdb and/or the term problems.
     
    26392642        return oVM;
    26402643
     2644    def forgetTestMachine(self, oVM, fQuiet = False):
     2645        """
     2646        Forget about an already known test VM in the test VM list.
     2647
     2648        Returns True on success, False if failed.
     2649        """
     2650        try:
     2651            sUuid = oVM.id;
     2652            sName = oVM.name;
     2653        except:
     2654            reporter.errorXcpt('failed to get the UUID for VM "%s"' % (oVM,));
     2655            return False;
     2656        try:
     2657            self.aoVMs.remove(oVM);
     2658            if not fQuiet:
     2659                reporter.log('Removed "%s" with name "%s"' % (sUuid, sName));
     2660        except:
     2661            reporter.errorXcpt('could not find vm "%s"' % (sName,));
     2662            return False;
     2663        return True;
     2664
    26412665    def openSession(self, oVM):
    26422666        """
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