mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-07 23:37:53 +00:00
trivial: Make fuzzing less verbose
This commit is contained in:
parent
9188060ce2
commit
66532a1293
@ -18,6 +18,7 @@ with a non-standard filesystem layout.
|
|||||||
* `FWUPD_DBUS_SOCKET` is used to set the socket filename if running without a dbus-daemon
|
* `FWUPD_DBUS_SOCKET` is used to set the socket filename if running without a dbus-daemon
|
||||||
* `FWUPD_DOWNLOAD_VERBOSE` can be used to show wget or curl output
|
* `FWUPD_DOWNLOAD_VERBOSE` can be used to show wget or curl output
|
||||||
* `FWUPD_PROFILE` can be used to set the profile traceback threshold value in ms
|
* `FWUPD_PROFILE` can be used to set the profile traceback threshold value in ms
|
||||||
|
* `FWUPD_FUZZER_RUNNING` if the firmware format is being fuzzed
|
||||||
* standard glibc variables like `LANG` are also honored for CLI tools that are translated
|
* standard glibc variables like `LANG` are also honored for CLI tools that are translated
|
||||||
* libcurl respects the session proxy, e.g. `http_proxy`, `all_proxy`, `sftp_proxy` and `no_proxy`
|
* libcurl respects the session proxy, e.g. `http_proxy`, `all_proxy`, `sftp_proxy` and `no_proxy`
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ LLVMFuzzerTestOneInput(const guint8 *data, gsize size)
|
|||||||
gboolean ret;
|
gboolean ret;
|
||||||
|
|
||||||
(void)g_setenv("G_DEBUG", "fatal-criticals", FALSE);
|
(void)g_setenv("G_DEBUG", "fatal-criticals", FALSE);
|
||||||
|
(void)g_setenv("FWUPD_FUZZER_RUNNING", "1", TRUE);
|
||||||
ret = fu_firmware_parse(firmware, fw, FWUPD_INSTALL_FLAG_NONE, NULL);
|
ret = fu_firmware_parse(firmware, fw, FWUPD_INSTALL_FLAG_NONE, NULL);
|
||||||
if (!ret && fu_firmware_has_flag(firmware, FU_FIRMWARE_FLAG_HAS_CHECKSUM)) {
|
if (!ret && fu_firmware_has_flag(firmware, FU_FIRMWARE_FLAG_HAS_CHECKSUM)) {
|
||||||
g_clear_object(&firmware);
|
g_clear_object(&firmware);
|
||||||
|
@ -117,7 +117,8 @@ fu_bcm57xx_dict_image_ensure_id(FuBcm57xxDictImage *self)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
id = g_strdup_printf("dict-%02x-%02x", self->target, self->kind);
|
id = g_strdup_printf("dict-%02x-%02x", self->target, self->kind);
|
||||||
g_warning("falling back to %s, please report", id);
|
if (g_getenv("FWUPD_FUZZER_RUNNING") == NULL)
|
||||||
|
g_warning("falling back to %s, please report", id);
|
||||||
fu_firmware_set_id(FU_FIRMWARE(self), id);
|
fu_firmware_set_id(FU_FIRMWARE(self), id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +198,8 @@ fu_uf2_firmware_parse_chunk(FuUf2Firmware *self, FuChunk *chk, GByteArray *tmp,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
fu_firmware_set_id(FU_FIRMWARE(self), utf8buf);
|
fu_firmware_set_id(FU_FIRMWARE(self), utf8buf);
|
||||||
} else {
|
} else {
|
||||||
g_warning("unknown tag 0x%06x", tag);
|
if (g_getenv("FWUPD_FUZZER_RUNNING") == NULL)
|
||||||
|
g_warning("unknown tag 0x%06x", tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* next! */
|
/* next! */
|
||||||
|
Loading…
Reference in New Issue
Block a user