File: igt_facts.h

package info (click to toggle)
intel-gpu-tools 2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 63,360 kB
  • sloc: xml: 781,458; ansic: 360,567; python: 8,336; yacc: 2,781; perl: 1,196; sh: 1,177; lex: 487; asm: 227; lisp: 35; makefile: 30
file content (46 lines) | stat: -rw-r--r-- 1,056 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* SPDX-License-Identifier: MIT
 * Copyright © 2024 Intel Corporation
 */

#ifndef IGT_FACTS_H
#define IGT_FACTS_H

#include <stdbool.h>

#include "igt_list.h"

/* igt_fact:
 * @name: name of the fact
 * @value: value of the fact
 * @last_test: name of the test that triggered the fact
 * @present: bool indicating if fact is present. Used for deleting facts from
 * the list.
 * @link: link to the next fact
 *
 * A fact is a piece of information that can be used to determine the state of
 * the system.
 *
 */
typedef struct {
	char *name;
	char *value;
	char *last_test;
	bool present; /* For mark and sweep */
	struct igt_list_head link;
} igt_fact;

/* igt_facts configuration:
 * @enabled: bool indicating if igt_facts is enabled
 * @disable_udev: bool indicating if udev is disabled
 */
struct igt_facts_config {
	bool enabled;
	bool disable_udev;
};

void igt_facts_lists_init(void);
void igt_facts(const char *last_test);
bool igt_facts_are_all_lists_empty(void);
void igt_facts_test(void); /* For unit testing only */

#endif /* IGT_FACTS_H */