관리-도구
편집 파일: test_osx.cpython-36.opt-1.pyc
3 ��JZ�% � @ s< d Z ddlZddlZddlZddlZddlmZ ddlmZ ddlmZ ddlm Z ddlm Z ddlmZ dd lmZ dd lm Z ddlmZ ddlmZ er�ejd �ndZdd� Zdd� Zdd� Zeje d�G dd� dej��Zeje d�G dd� dej��Zeje d�G dd� dej��Zedk�r8e e� dS )zOSX specific tests.� N)�OSX)�create_zombie_proc)�get_test_subprocess)�HAS_BATTERY)�MEMORY_TOLERANCE)� reap_children)�retry_before_failing)�run_test_module_by_name)�sh)�unittest�SC_PAGE_SIZEc C s6 t | �}|j� d }yt|�S tk r0 |S X dS )zmExpects a sysctl command with an argument and parse the result returning only the value of interest. � N)r �split�int� ValueError)�cmdline�out�result� r � /usr/lib64/python3.6/test_osx.py�sysctl s r c C sH t d�}x$|jd�D ]}| |krP qW td��ttjd|�jd��t S )z)Wrapper around 'vm_stat' cmdline utility.�vm_stat� zline not foundz\d+r )r r r r �re�search�group�PAGESIZE)Zfieldr �liner r r r ( s r c C s� ddi}| }d}x@| r&| dd � j � s6| dd � dkrP|| d 7 }| d d � } qW t|�}| j� }xD|j� D ]\}}||krlP qlW |dkr�|d }|j� }ntd| ��|d d i}x0t|d d � �D ]\}} d |d d >