Allow fuzzing libCUPS on linux and chromeos
Relaxed use_cups rules to just require a copy of libCUPS to allow fuzzing. Bug: chromium:831914 Test: ran fuzz test Change-Id: I190eab4f7de3bbb4d096a39cabb4bb7fb9e3de3b Reviewed-on: https://chromium-review.googlesource.com/c/1479899 Reviewed-by: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: John Budorick <jbudorick@chromium.org> Reviewed-by: Max Moroz <mmoroz@chromium.org> Commit-Queue: Luum Habtemariam <luum@chromium.org> Cr-Commit-Position: refs/heads/master@{#635339}
This commit is contained in:

committed by
Commit Bot

parent
384527d2cd
commit
90f8fec5b6
1
BUILD.gn
1
BUILD.gn
@ -723,6 +723,7 @@ group("gn_all") {
|
||||
if ((is_linux && !is_chromecast) ||
|
||||
(is_win && (use_drfuzz || use_libfuzzer)) || (use_libfuzzer && is_mac)) {
|
||||
deps += [
|
||||
"//chrome/services/cups_ipp_parser/public/cpp:fuzzers",
|
||||
"//testing/libfuzzer/fuzzers",
|
||||
"//third_party/grpc:fuzzers",
|
||||
"//third_party/icu/fuzzers",
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "ash/components/tap_visualizer/public/cpp/manifest.h"
|
||||
#include "ash/public/cpp/manifest.h"
|
||||
#include "chrome/browser/chromeos/prefs/ash_pref_connector_manifest.h"
|
||||
#include "chrome/services/cups_ipp_parser/public/cpp/manifest.h"
|
||||
#include "chrome/services/cups_ipp_parser/public/cpp/manifest.h" // nogncheck
|
||||
#include "chromeos/services/ime/public/cpp/manifest.h"
|
||||
#include "chromeos/services/secure_channel/public/cpp/manifest.h"
|
||||
#include "services/ws/public/mojom/input_devices/input_device_controller.mojom.h"
|
||||
|
@ -22,15 +22,18 @@ if (use_cups) {
|
||||
configs += [ "//printing:cups" ]
|
||||
}
|
||||
|
||||
fuzzer_test("ipp_message_parser_fuzzer") {
|
||||
sources = [
|
||||
"ipp_message_parser_fuzzer.cc",
|
||||
]
|
||||
deps = [
|
||||
":cpp",
|
||||
]
|
||||
# Fuzzer target only available on fuzzing builds.
|
||||
if (use_fuzzing_engine) {
|
||||
fuzzer_test("ipp_message_parser_fuzzer") {
|
||||
sources = [
|
||||
"ipp_message_parser_fuzzer.cc",
|
||||
]
|
||||
deps = [
|
||||
":cpp",
|
||||
]
|
||||
|
||||
dict = "ipp_message_parser_fuzzer.dict"
|
||||
dict = "ipp_message_parser_fuzzer.dict"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,3 +49,7 @@ source_set("manifest") {
|
||||
"//services/service_manager/public/cpp",
|
||||
]
|
||||
}
|
||||
|
||||
# A dummy group to make fuzz targets discoverable.
|
||||
group("fuzzers") {
|
||||
}
|
||||
|
@ -208,6 +208,14 @@ component("printing") {
|
||||
"backend/print_backend_cups.cc",
|
||||
"backend/print_backend_cups.h",
|
||||
]
|
||||
|
||||
# We still build the utils for fuzzing.
|
||||
if (use_fuzzing_engine) {
|
||||
sources += [
|
||||
"backend/cups_ipp_util.cc",
|
||||
"backend/cups_ipp_util.h",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
import("//build/config/chromecast_build.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//build/config/sanitizers/sanitizers.gni")
|
||||
|
||||
declare_args() {
|
||||
# Enable basic printing support and UI.
|
||||
@ -15,5 +16,10 @@ declare_args() {
|
||||
# enable_basic_printing within the same declare_args() block.
|
||||
enable_print_preview = !is_android && !is_chromecast && !is_ios && !is_fuchsia
|
||||
|
||||
use_cups = (is_desktop_linux || is_mac) && !is_chromecast && !is_fuchsia
|
||||
if (use_fuzzing_engine) {
|
||||
# For fuzzing, just restrict to chromeos and linux.
|
||||
use_cups = is_linux
|
||||
} else {
|
||||
use_cups = (is_desktop_linux || is_mac) && !is_chromecast && !is_fuchsia
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user