Lines Matching refs:log
46 static int load(char *log, size_t log_len, int log_level) in load() argument
55 attr.log_buf = ptr_to_u64(log); in load()
86 static void test_log_good(char *log, size_t buf_len, size_t log_len, in test_log_good() argument
92 memset(log, 1, buf_len); in test_log_good()
94 ret = load(log, log_len, 1); in test_log_good()
97 len = strnlen(log, buf_len); in test_log_good()
108 if (strchr(log, 1)) { in test_log_good()
113 check_ones(log + len + 1, buf_len - len - 1, in test_log_good()
116 if (memcmp(full_log, log, LOG_SIZE)) { in test_log_good()
122 static void test_log_bad(char *log, size_t log_len, int log_level) in test_log_bad() argument
126 ret = load(log, log_len, log_level); in test_log_bad()
128 if (log) in test_log_bad()
129 check_ones(log, LOG_SIZE, in test_log_bad()
136 char log[LOG_SIZE]; in main() local
140 memset(log, 1, LOG_SIZE); in main()
147 test_log_bad(log, LOG_SIZE, 0); in main()
150 test_log_bad(log, 15, 1); in main()
162 test_log_good(log, LOG_SIZE, want_len + 2, want_len, EACCES, full_log); in main()
169 test_log_good(log, LOG_SIZE, want_len + 1 - i, want_len - i, in main()