Skip to content

Commit e9b49f3

Browse files
lszekerescopybara-github
authored andcommitted
A few more LOG macro cleanup.
PiperOrigin-RevId: 797932466
1 parent 73721c6 commit e9b49f3

File tree

11 files changed

+10
-22
lines changed

11 files changed

+10
-22
lines changed

centipede/BUILD

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ cc_library(
281281
deps = [
282282
"@abseil-cpp//absl/base:core_headers",
283283
"@abseil-cpp//absl/functional:any_invocable",
284-
"@abseil-cpp//absl/log:check",
285284
"@abseil-cpp//absl/synchronization",
286285
"@com_google_fuzztest//common:logging",
287286
],
@@ -1865,7 +1864,7 @@ cc_test(
18651864
srcs = ["crash_summary_test.cc"],
18661865
deps = [
18671866
":crash_summary",
1868-
"@abseil-cpp//absl/log:check",
1867+
"@com_google_fuzztest//common:logging",
18691868
"@googletest//:gtest_main",
18701869
],
18711870
)

centipede/crash_summary_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include "gmock/gmock.h"
2121
#include "gtest/gtest.h"
22-
#include "absl/log/check.h"
22+
#include "./common/logging.h"
2323

2424
namespace fuzztest::internal {
2525
namespace {
@@ -39,7 +39,7 @@ class CrashSummaryTest : public testing::Test {
3939

4040
protected:
4141
static void DumpCrashSummary(const CrashSummary& summary) {
42-
CHECK(dumped_summary_ == nullptr);
42+
FUZZTEST_CHECK(dumped_summary_ == nullptr);
4343
dumped_summary_ = new CrashSummary{summary};
4444
};
4545

centipede/tools/BUILD

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@ cc_binary(
2424
deps = [
2525
"@abseil-cpp//absl/flags:flag",
2626
"@abseil-cpp//absl/flags:parse",
27-
"@abseil-cpp//absl/log",
28-
"@abseil-cpp//absl/log:check",
2927
"@abseil-cpp//absl/status",
3028
"@abseil-cpp//absl/status:statusor",
3129
"@com_google_fuzztest//centipede:feature",
3230
"@com_google_fuzztest//centipede:util",
3331
"@com_google_fuzztest//common:blob_file",
3432
"@com_google_fuzztest//common:defs",
33+
"@com_google_fuzztest//common:logging",
3534
],
3635
)

centipede/tools/feature_analyzer.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@
2626

2727
#include "absl/flags/flag.h"
2828
#include "absl/flags/parse.h"
29-
#include "absl/log/check.h"
30-
#include "absl/log/log.h"
3129
#include "absl/status/status.h"
3230
#include "absl/status/statusor.h"
3331
#include "./centipede/feature.h"
3432
#include "./centipede/util.h"
3533
#include "./common/blob_file.h"
3634
#include "./common/defs.h"
35+
#include "./common/logging.h"
3736

3837
ABSL_FLAG(std::string, feature_file, "", "Path to the feature file to read");
3938

@@ -63,7 +62,7 @@ absl::StatusOr<FeatureVec> ReadFeaturesFile(absl::string_view features_path) {
6362

6463
absl::Status FeatureAnalyzerMain() {
6564
size_t user_domain = absl::GetFlag(FLAGS_user_domain);
66-
CHECK_LT(user_domain, feature_domains::kUserDomains.size());
65+
FUZZTEST_CHECK_LT(user_domain, feature_domains::kUserDomains.size());
6766
size_t goal_domain = feature_domains::kUserDomains[user_domain].domain_id();
6867

6968
absl::StatusOr<FeatureVec> features_or =

e2e_tests/testdata/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ cc_binary(
105105
"@com_google_fuzztest//fuzztest:flatbuffers",
106106
"@com_google_fuzztest//fuzztest:fuzztest_gtest_main",
107107
"@com_google_fuzztest//fuzztest:googletest_fixture_adapter",
108-
"@com_google_fuzztest//fuzztest/internal:logging",
109108
"@com_google_fuzztest//fuzztest/internal:test_flatbuffers_cc_fbs",
110109
"@com_google_fuzztest//fuzztest/internal:test_protobuf_cc_proto",
111110
"@protobuf",

e2e_tests/testdata/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ target_link_libraries(
4141
re2::re2
4242
fuzztest_flatbuffers
4343
fuzztest_googletest_fixture_adapter
44-
fuzztest_logging
44+
fuzztest_common_logging
4545
fuzztest_test_flatbuffers_headers
4646
)
4747
link_fuzztest(fuzz_tests_for_functional_testing.stripped)

e2e_tests/testdata/fuzz_tests_for_functional_testing.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
//
1717
// Specifically, used by `functional_test` only.
1818

19-
#include <cerrno>
2019
#include <csignal>
2120
#include <cstdint>
2221
#include <cstdio>
@@ -40,7 +39,6 @@
4039
#include "absl/time/clock.h"
4140
#include "absl/time/time.h"
4241
#include "./common/logging.h"
43-
#include "./fuzztest/internal/logging.h"
4442
#include "./fuzztest/internal/test_flatbuffers_generated.h"
4543
#include "./fuzztest/internal/test_protobuf.pb.h"
4644
#include "google/protobuf/descriptor.h"
@@ -798,11 +796,11 @@ class AlternateSignalStackFixture {
798796
// where the callbacks from the signal handler happen in a separate stack.
799797
new_sigact.sa_flags = SA_SIGINFO | SA_ONSTACK;
800798

801-
FUZZTEST_CHECK(sigaction(SIGUSR1, &new_sigact, nullptr) == 0) << errno;
799+
FUZZTEST_PCHECK(sigaction(SIGUSR1, &new_sigact, nullptr) == 0);
802800
stack_t test_stack = {};
803801
test_stack.ss_size = 1 << 20;
804802
test_stack.ss_sp = malloc(test_stack.ss_size);
805-
FUZZTEST_CHECK(sigaltstack(&test_stack, &old_stack) == 0) << errno;
803+
FUZZTEST_PCHECK(sigaltstack(&test_stack, &old_stack) == 0);
806804
}
807805

808806
void StackCalculationWorksWithAlternateStackForSignalHandlers(int i) {
@@ -822,7 +820,7 @@ class AlternateSignalStackFixture {
822820
~AlternateSignalStackFixture() {
823821
stack_t test_stack = {};
824822
// Resume to the old signal stack.
825-
FUZZTEST_CHECK(sigaltstack(&old_stack, &test_stack) == 0) << errno;
823+
FUZZTEST_PCHECK(sigaltstack(&old_stack, &test_stack) == 0);
826824
free(test_stack.ss_sp);
827825
}
828826

fuzztest/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ cc_library(
130130
"@com_google_fuzztest//fuzztest/internal:flag_name",
131131
"@com_google_fuzztest//fuzztest/internal:googletest_adaptor",
132132
"@com_google_fuzztest//fuzztest/internal:io",
133-
"@com_google_fuzztest//fuzztest/internal:logging",
134133
"@com_google_fuzztest//fuzztest/internal:registry",
135134
"@com_google_fuzztest//fuzztest/internal:runtime",
136135
"@googletest//:gtest",

fuzztest/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ fuzztest_cc_library(
199199
fuzztest::flag_name
200200
fuzztest::googletest_adaptor
201201
fuzztest::io
202-
fuzztest::logging
203202
fuzztest::registry
204203
fuzztest::runtime
205204
GTest::gtest

fuzztest/fuzztest_macros.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
#include "./fuzztest/fuzztest_macros.h"
1616

17-
#include <cerrno>
1817
#include <cstring>
1918
#include <filesystem> // NOLINT
2019
#include <fstream>

0 commit comments

Comments
 (0)