tests: add a fuzzer for dev_kmsg_record

This commit is contained in:
Evgeny Vereshchagin
2018-11-16 08:44:35 +01:00
parent a6da77b71b
commit 8857fb9beb
8 changed files with 44 additions and 1 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ static bool is_us(const char *identifier, const char *pid) {
streq(identifier, program_invocation_short_name);
}
static void dev_kmsg_record(Server *s, char *p, size_t l) {
void dev_kmsg_record(Server *s, char *p, size_t l) {
_cleanup_free_ char *message = NULL, *syslog_priority = NULL, *syslog_pid = NULL, *syslog_facility = NULL, *syslog_identifier = NULL, *source_time = NULL, *identifier = NULL, *pid = NULL;
struct iovec iovec[N_IOVEC_META_FIELDS + 7 + N_IOVEC_KERNEL_FIELDS + 2 + N_IOVEC_UDEV_FIELDS];
+2
View File
@@ -9,3 +9,5 @@ int server_flush_dev_kmsg(Server *s);
void server_forward_kmsg(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred);
int server_open_kernel_seqnum(Server *s);
void dev_kmsg_record(Server *s, char *p, size_t l);