/* Process and validate that backends got expected content.  */
static void process_and_validate(bool backend2_enable, bool panic)
/* Process and validate that backends got expected content.  */
static void process_and_validate(bool backend2_enable, bool panic)
{
	if (!panic) {
		flush_log();
	}
	mock_log_frontend_validate(panic);
	if (NO_BACKENDS) {
		int cnt;
		STRUCT_SECTION_COUNT(log_backend, &cnt);
		zassert_equal(cnt, 0);
		return;
	}
	if (IS_ENABLED(CONFIG_LOG_FRONTEND_ONLY)) {
		return;
	}
	mock_log_backend_validate(&backend1, panic);
	if (backend2_enable) {
		mock_log_backend_validate(&backend2, panic);
	}
}