VirtualBox

Changeset 67048 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
May 23, 2017 4:27:05 PM (8 years ago)
Author:
vboxsync
Message:

ValidationKit: detect non-collectable VirtualBoxManager object (which generally is a victim of something else not being collectable due to cyclic references) and let someone know who is checking the logs

File:
1 edited

Legend:

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

    r67022 r67048  
    14081408            import gc
    14091409            gc.collect();
     1410            objects = gc.get_objects()
     1411            try:
     1412                try:
     1413                    from types import InstanceType
     1414                except ImportError:
     1415                    InstanceType = None # Python 3.x compatibility
     1416                for o in objects:
     1417                    objtype = type(o)
     1418                    if objtype == InstanceType: # Python 2.x codepath
     1419                        objtype = o.__class__
     1420                    if objtype.__name__ == 'VirtualBoxManager':
     1421                        reporter.log('actionCleanupAfter: CAUTION, there is still a VirtualBoxManager object, GC trouble')
     1422                        break
     1423            finally:
     1424                del objects
    14101425        except:
    14111426            reporter.logXcpt();
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