chromium/base/debug/elf_reader_unittest.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40284755): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "base/debug/elf_reader.h"

#include <dlfcn.h>

#include <cstdint>
#include <optional>
#include <string_view>

#include "base/debug/test_elf_image_builder.h"
#include "base/files/memory_mapped_file.h"
#include "base/native_library.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"

extern char __executable_start;

namespace base {
namespace debug {

namespace {
constexpr uint8_t kBuildIdBytes[] =;
constexpr const char kBuildIdHexString[] =;
constexpr const char kBuildIdHexStringLower[] =;

std::string ParamInfoToString(
    const ::testing::TestParamInfo<base::TestElfImageBuilder::MappingType>&
        param_info) {}
}  // namespace

ElfReaderTest;

TEST_P(ElfReaderTest, ReadElfBuildIdUppercase) {}

TEST_P(ElfReaderTest, ReadElfBuildIdLowercase) {}

TEST_P(ElfReaderTest, ReadElfBuildIdMultipleNotes) {}

TEST_P(ElfReaderTest, ReadElfBuildIdWrongName) {}

TEST_P(ElfReaderTest, ReadElfBuildIdWrongType) {}

TEST_P(ElfReaderTest, ReadElfBuildIdNoBuildId) {}

TEST_P(ElfReaderTest, ReadElfLibraryName) {}

TEST_P(ElfReaderTest, ReadElfLibraryNameNoSoName) {}

TEST_P(ElfReaderTest, GetRelocationOffset) {}

INSTANTIATE_TEST_SUITE_P();

TEST(ElfReaderTestWithCurrentElfImage, ReadElfBuildId) {}

TEST(ElfReaderTestWithCurrentImage, ReadElfBuildId) {}

}  // namespace debug
}  // namespace base