blob: 2865d325d3428699604a0f883e085bcf8b720166 [file] [log] [blame]
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";
package tast.cros.crash;
import "google/protobuf/empty.proto";
option go_package = "chromiumos/tast/services/cros/crash";
// FixtureService allows for remote setup/teardown of crash tests.
service FixtureService {
// SetUp sets up the DUT for a crash test.
// For more details on what, precisely, it does, see documentation for
// "SetUpCrashTest" in the local/crash tast library.
// After the test is complete, you must call TearDown to clean up the
// associated resources.
rpc SetUp (SetUpCrashTestRequest) returns (google.protobuf.Empty) {}
// EnableCrashFilter sets crash_reporter filter by process name.
rpc EnableCrashFilter (EnableCrashFilterRequest) returns (google.protobuf.Empty) {}
// DisableCrashFilter disables crash_reporter filter.
rpc DisableCrashFilter (google.protobuf.Empty) returns (google.protobuf.Empty) {}
// WaitForCrashFiles waits for the crash boot collector to finish, and then
// for the specified crash files to be present.
// See crash.go's WaitForCrashFiles for interface details.
rpc WaitForCrashFiles (WaitForCrashFilesRequest)
returns (WaitForCrashFilesResponse) {}
// RemoveAllFiles removes all files in the request.
rpc RemoveAllFiles (RemoveAllFilesRequest) returns (google.protobuf.Empty) {}
// SetConsent sets consent as specified in the request.
rpc SetConsent (SetConsentRequest) returns (google.protobuf.Empty) {}
// TearDown undoes the actions SetUp does and resets the machine to normal
// state.
rpc TearDown (google.protobuf.Empty) returns (google.protobuf.Empty) {}
}
message SetUpCrashTestRequest {
enum ConsentType {
MOCK_CONSENT = 0;
REAL_CONSENT = 1;
}
ConsentType consent = 1;
}
message EnableCrashFilterRequest {
// Name of the program to be handled by crash_reporter.
// There are two special cases:
// An empty string means all crashes should be handled. Equivalent to DisableCrashFilter.
// A string "none" means no crashes should be handled at all regardless of process name.
string name = 1;
}
// This deliberately does NOT use the "oldFiles" parameter in WaitForCrashFiles
// because that is redundant with SetUp's function of moving crashes to a
// temporary stash directory (and will eventually be removed).
message WaitForCrashFilesRequest {
repeated string dirs = 1;
repeated string regexes = 2;
}
message WaitForCrashFilesResponse {
repeated RegexMatch matches = 1;
}
message RemoveAllFilesRequest {
repeated RegexMatch matches = 1;
}
message SetConsentRequest {
bool consent = 1;
}
message RegexMatch {
string regex = 1;
repeated string files = 2;
}