blob: 83e1977df438018498c0e76f2b6164b7c40dd684 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library ddk.protocol.test;
using zx;
struct TestReport {
uint64 n_tests;
uint64 n_success;
uint64 n_failed;
};
[Layout="ddk-callback"]
interface TestFunc {
1: Callback(vector<void> arg) -> (zx.status s, TestReport report);
};
[Layout="ddk-protocol"]
interface Test {
/// Sets test output socket.
1: SetOutputSocket(handle<socket> @handle) -> ();
/// Gets test output socket.
2: GetOutputSocket() -> (handle<socket> h);
/// Sets control channel.
3: SetControlChannel(handle<channel> @handle) -> ();
/// Gets control channel.
4: GetControlChannel() -> (handle<channel> @handle);
/// Sets test function.
5: SetTestFunc(TestFunc func) -> ();
/// Run tests, calls the function set in |SetTestFunc|.
6: RunTests(vector<void> arg) -> (zx.status s, TestReport report);
/// Calls `device_remove()`.
7: Destroy() -> ();
};