NativePocMallocDebugAsserter

public class NativePocMallocDebugAsserter
extends Object implements NativePocAsserter

java.lang.Object
   ↳ com.android.sts.common.NativePocMallocDebugAsserter


摘要

公共方法

static NativePocAsserter assertNoMallocDebugErrorOnPoc(String options)

返回一个 NativePocAsserter,用于将 libc malloc 调试附加到 PoC 并在 PoC 运行时检查是否存在任何 malloc 调试错误。

static NativePocAsserter assertNoMallocDebugErrorOnService(String options, String service)

返回一个 NativePocAsserter,用于在运行 PoC 之前将 libc malloc 调试附加到服务,并在 PoC 运行期间检查该服务是否存在任何 malloc 调试错误。

AutoCloseable withAutoCloseable(NativePoc nativePoc, ITestDevice device)

在 PoC 运行之前调用,返回一个 AutoCloseable,该 AutoCloseable 会在 PoC 完成后关闭

公共方法

assertNoMallocDebugErrorOnPoc

public static NativePocAsserter assertNoMallocDebugErrorOnPoc (String options)

返回一个 NativePocAsserter,用于将 libc malloc 调试附加到 PoC 并在 PoC 运行期间检查是否存在任何 malloc 调试错误。

参数
options String

返回
NativePocAsserter

assertNoMallocDebugErrorOnService

public static NativePocAsserter assertNoMallocDebugErrorOnService (String options, 
                String service)

返回一个 NativePocAsserter,用于在运行 PoC 之前将 libc malloc 调试附加到服务,并在 PoC 运行期间检查该服务是否存在任何 malloc 调试错误。

参数
options String

service String

返回
NativePocAsserter

withAutoCloseable

public AutoCloseable withAutoCloseable (NativePoc nativePoc, 
                ITestDevice device)

在 PoC 运行之前调用,返回一个 AutoCloseable,该 AutoCloseable 会在 PoC 完成后关闭

参数
nativePoc NativePoc

device ITestDevice

返回
AutoCloseable

抛出
DeviceNotAvailableException
TimeoutException
ProcessUtil.KillException