You can also test whether a user-space pointer is valid through a call to access_ok.
您也可以通过调用access_ok来测试用户空间指针是否有效。
With the asyncEcho test, it wraps the asserts in a try/catch, and any errors are passed back to the DOH through the deferred.errback(error) call.
对于 asyncEcho 测试,它将断言包装进一个 try/catch 程序块,并且,任何错误都将通过 deferred.errback(error) 调用被传递回 DOH。
Now, we can call the reset method to start off each test run to ensure we are going through the initialization code for the singleton object on every test run.
现在,我们可以在每次测试之前调用reset方法,保证我们在每次测试过程中都会先执行singleton对象的初始化代码。
应用推荐