chromium/third_party/crashpad/crashpad/snapshot/sanitized/process_snapshot_sanitized_test.cc

// Copyright 2018 The Crashpad Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "snapshot/sanitized/process_snapshot_sanitized.h"

#include <string.h>

#include <iterator>

#include "base/notreached.h"
#include "build/build_config.h"
#include "gtest/gtest.h"
#include "test/multiprocess_exec.h"
#include "util/file/file_io.h"
#include "util/misc/address_sanitizer.h"
#include "util/numeric/safe_assignment.h"

#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
#include <sys/syscall.h>

#include "snapshot/linux/process_snapshot_linux.h"
#include "util/linux/direct_ptrace_connection.h"
#include "util/linux/exception_information.h"
#include "util/posix/signals.h"
#endif

namespace crashpad {
namespace test {
namespace {

class ExceptionGenerator {};

constexpr char kAllowedAnnotationName[] =;
constexpr char kAllowedAnnotationNamePattern[] =;
constexpr char kAllowedAnnotationNamePatternActual[] =;
constexpr char kAllowedAnnotationValue[] =;
constexpr char kNonAllowedAnnotationName[] =;
constexpr char kNonAllowedAnnotationValue[] =;
constexpr char kSensitiveStackData[] =;

struct ChildTestAddresses {};

void ChildTestFunction() {}

CRASHPAD_CHILD_TEST_MAIN(ChildToBeSanitized) {}

void ExpectAnnotations(ProcessSnapshot* snapshot, bool sanitized) {}

void ExpectProcessMemory(ProcessSnapshot* snapshot,
                         VMAddress allowed_byte,
                         bool sanitized) {}

class StackSanitizationChecker : public MemorySnapshot::Delegate {};

void ExpectStackData(ProcessSnapshot* snapshot,
                     const ChildTestAddresses& addrs,
                     bool sanitized) {}

class SanitizeTest : public MultiprocessExec {};

TEST(ProcessSnapshotSanitized, Sanitize) {}

}  // namespace
}  // namespace test
}  // namespace crashpad