File: ci_infrastructure.md

package info (click to toggle)
intel-gpu-tools 2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 64,504 kB
  • sloc: xml: 781,458; ansic: 378,272; python: 8,407; yacc: 2,781; perl: 1,196; sh: 1,177; lex: 487; asm: 227; lisp: 35; makefile: 30
file content (390 lines) | stat: -rw-r--r-- 10,665 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
# :material-cloud-cog: CI Infrastructure

## :material-information-outline: Overview

IGT GPU Tools employs a comprehensive Continuous Integration (CI) infrastructure to ensure
code quality, prevent regressions, and maintain driver stability. The CI system operates
across multiple platforms and architectures, providing automated testing for both pre-merge
and post-merge scenarios.

The infrastructure consists of a main component:

- **GitLab CI** (Freedesktop.org) - Build validation and cross-platform testing

There are CI infrastructures which focus on specific HW platforms:

- **Intel GFX CI** - Comprehensive hardware testing on real Intel GPU systems

##
## :material-gitlab: GitLab CI (Freedesktop.org)

### Infrastructure Overview

IGT uses GitLab CI hosted at `gitlab.freedesktop.org` for:

- **Build validation** across multiple architectures
- **Container-based testing** for reproducible environments
- **Cross-platform compatibility** checks
- **Documentation generation** and validation

### Container Infrastructure

IGT leverages containerized builds for consistency and reliability:

```bash
# Pre-built containers available at:
registry.freedesktop.org/drm/igt-gpu-tools/igt:master

# Run IGT in container:
podman run --rm --privileged registry.freedesktop.org/drm/igt-gpu-tools/igt:master
```

### Build Matrix

| Platform | Architecture | Purpose |
|-|-||
| **Debian** | x86_64 | Primary build and test platform |
| **Fedora** | x86_64 | Alternative distro validation |
| **Debian Minimal** | x86_64 | Minimal dependency testing |
| **Multi-arch** | arm64, mips | Cross-platform compatibility |

## :material-cpu-64-bit: Intel GFX CI

### Mission-Critical Testing

Intel GFX CI provides the backbone for Intel GPU driver validation:

!!! quote "Intel GFX CI Mission"
    "Test each patch that goes into i915, Intel Xe, or IGT GPU Tools **before** it lands
    in the repository, comparing results with post-merge baselines to catch regressions
    early."

### Hardware Infrastructure

**Diverse GPU Coverage:**

- Multiple Intel GPU generations (Gen7 through latest)
- Various form factors (desktop, mobile, server)
- Different display configurations (HDMI, DP, eDP, VGA)
- Specialized hardware for specific features

**Sample Hardware Types:**

- `bat-apl-1` - Apollo Lake platform
- `bat-jsl-3` - Jasper Lake system
- `bat-rpls-1` - Raptor Lake S
- `bat-mtlp-8` - Meteor Lake P
- `shard-tglb1` - Tiger Lake (sharded testing)

### Test Execution Tiers

#### 1. Basic Acceptance Tests (BAT)
**Purpose:** Fast feedback and gating mechanism

**Duration:** ~1 hour

**Test List:** `tests/intel-ci/fast-feedback.testlist`

```bash
# Example BAT tests:
igt@core_auth@getclient-simple
igt@i915_module_load@load
igt@kms_busy@basic@modeset
igt@debugfs_test@read_all_entries
```

**Key Characteristics:**

- Ensures testing configuration is working
- Gates all further testing (sharded runs)
- Fast-feedback tests for quick validation
- Must pass before proceeding to full testing

#### 2. Full IGT (Sharded Runs)
**Purpose:** Comprehensive validation
**Duration:** ~6 hours
**Scope:** All IGT tests (filtered by blocklists)

**Driver-Specific Execution:**

- **i915:** All IGT tests filtered by `blocklist.txt`
- **Xe:** All IGT tests filtered by `xe.blocklist.txt`

**Sharding Strategy:**
Tests are distributed across multiple machines for parallel execution:

- `shard-tglb1`, `shard-tglb2` - Tiger Lake systems
- `shard-dg2` - DG2/Arc GPU systems
- Multiple concurrent executions for faster results

#### 3. Specialized Runs

| Run Type | Purpose | Characteristics |
|-||--|
| **Idle Runs** | Extra coverage during quiet periods | Run when CI is idle |
| **KASAN Runs** | Memory safety validation | Kernel Address Sanitizer enabled |
| **100 Re-runs** | Flaky test detection | Same test 100 times for statistics |
| **Resume Runs** | Suspend/resume validation | Single machine, resume capability |
| **drmtip Runs** | Extended coverage | Full IGT on BAT hardware |

## :material-email-fast: Pre-Merge Testing Workflow

### Patch Submission Process

 1. **Mailing List Submission**
   ```bash
   # IGT patches should include i-g-t tag:
   git config --local format.subjectPrefix "PATCH i-g-t"
   # Example subject:
   [PATCH i-g-t] tests/kms_atomic: Add new subtest for cursor planes
   ```
 2. **Automatic CI Triggering**
    - CI automatically detects patches on mailing lists
    - Both BAT and Full IGT are scheduled
    - Results sent as email replies to original patch

 3. **Result Timeline**
    - BAT Results: ~1 hour
    - Full IGT Results: ~6 hours
    - All results emailed even on success

### Forcing Custom Test Configurations

For specific testing needs, developers can override CI behavior:

```bash
# Force specific tests in BAT (mark with HAX):
[PATCH i-g-t HAX] tests/intel-ci: Add kms_example to fast-feedback

# Change kernel configuration:
[PATCH HAX] kernel: Enable CONFIG_EXAMPLE for testing

# Force IGT test list changes:
# Modify tests/intel-ci/fast-feedback.testlist in a HAX patch
```

### Trybot System

!!! info "Works for i915 only"
**Purpose:** Test changes before formal review

**Usage:**

- Submit to trybot mailing list
- Get CI feedback without formal patch review
- Useful for experimental changes

## :material-bug: Results and Bug Tracking

### Result Categories

| Result | Description | Action Required |
|--|-|--|
| **PASS** | Test completed successfully | None |
| **SKIP** | Test skipped (missing hardware/feature) | Generally acceptable |
| **FAIL** | Test failed | Investigation required |
| **Dmesg-Warn** | Kernel warnings detected | Review warnings |
| **Incomplete** | Test didn't complete | Infrastructure issue |

### Bug Tracking Integration

**Automated Bug Filtering:**

- Known issues are filtered out using pattern matching
- New failures automatically trigger investigation
- Results tied to specific dmesg patterns and hardware

**Bug Trackers:**

- **freedesktop GitLab** - Kernel, Xe, and IGT issues
- **Hardware-specific filters** - Machine type patterns
- **Pattern-based matching** - dmesg output analysis

## :material-git: Repository Integration

### CI-Tagged Repositories

**IGT CI Tags:** `https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags.git`

- Contains CI-specific tags and metadata
- Used for tracking tested versions
- Integration with kernel development

**Kernel Integration:** `git://anongit.freedesktop.org/gfx-ci/linux`

- Kernel tree with CI integration
- Automated testing of kernel + IGT combinations
- Firmware coordination

### Firmware Management

**Firmware Repositories:**

- **intel-staging** - Upcoming firmware blobs ready for merge
- **intel-for-ci** - CI-specific firmware with intel-ci directory
- **Automatic deployment** - Firmware updated on test machines

**Firmware Deployment Process:**

1. New pushes detected on firmware branches
2. Extract i915 and xe directories from intel-staging
3. Extract intel-ci from intel-for-ci
4. Deploy all three directories to test machines
5. Integrate with base OS firmware tree (Ubuntu)

## :material-docker: Container Registry

### Available Images

**Primary IGT Container:**
```bash
registry.freedesktop.org/drm/igt-gpu-tools/igt:master
```

**Build Images:**

- Debian-based development environment
- Fedora-based testing environment
- Multi-architecture build support
- Documentation generation environment

### Usage Examples

```bash
# Run tests in container:
podman run --rm --privileged \
  registry.freedesktop.org/drm/igt-gpu-tools/igt:master \
  /usr/libexec/igt-gpu-tools/core_auth

# Build IGT in container:
podman run --rm -v $(pwd):/workspace \
  registry.freedesktop.org/drm/igt-gpu-tools/igt:master \
  bash -c "cd /workspace && meson build && ninja -C build"
```

## :material-chart-timeline-variant: CI Configuration Files

### GitLab CI Configuration

**Primary Configuration:** `.gitlab-ci.yml`

- Multi-stage pipeline definition
- Container build and test stages
- Cross-architecture build matrix
- Documentation generation jobs

**Key Configuration Sections:**
```yaml
# Build stage example:
build:
  stage: build
  script:
    - meson build
    - ninja -C build
  artifacts:
    paths:
      - build/

# Test stage example:
test:
  stage: test
  script:
    - cd build && meson test
```

### Intel CI Configuration

**Test Lists:**

- `tests/intel-ci/fast-feedback.testlist` - BAT test definitions
- `tests/intel-ci/xe-fast-feedback.testlist` - Xe-specific BAT tests
- `tests/intel-ci/blocklist.txt` - i915 test exclusions
- `tests/intel-ci/xe.blocklist.txt` - Xe test exclusions

**Hardware Configuration:**

- Platform-specific test routing
- Display configuration requirements
- GPU generation compatibility matrices

## :material-monitor-dashboard: Monitoring and Maintenance

### Performance Metrics

**CI Health Indicators:**

- Queue depth and processing time
- Success/failure rates by platform
- Hardware utilization statistics
- Container build performance

**Continuous Monitoring:**

- Real-time queue status
- Historical trend analysis
- Capacity planning metrics
- Infrastructure reliability tracking

### Maintenance Operations

**Regular Tasks:**

- Container image updates
- Hardware firmware updates
- Test list maintenance
- Bug filter updates

**Scaling Operations:**

- Hardware addition/retirement
- Load balancing adjustments
- Performance optimization
- Capacity expansion

## :material-account-group: Development Integration

### Developer Workflow

1. **Local Development**
   ```bash
   # Test locally with containers:
   podman run --rm --privileged \
     -v $(pwd):/workspace \
     registry.freedesktop.org/drm/igt-gpu-tools/igt:master
   ```

2. **Patch Submission**:

    - Email patches to mailing lists
    - CI automatically triggered
    - Results delivered via email

3. **Result Analysis**

    - Review BAT results first (~1 hour)
    - Full results available later (~6 hours)
    - Investigate any failures or warnings

### Best Practices

**For Contributors:**

- Test patches locally before submission
- Use appropriate subject line tags ([PATCH i-g-t])
- Mark experimental patches with HAX
- Monitor CI results and respond to failures

**For Maintainers:**

- Review CI results before merging
- Update test lists as needed
- Maintain bug filters
- Coordinate with hardware teams

## :material-link-variant: Resources and References

### CI Infrastructure Links

- **[Freedesktop Gitlab CI Pipelines](https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/pipelines)**
- **[Container Registry](https://gitlab.freedesktop.org/drm/igt-gpu-tools/container_registry)**
- **[CI Tags Repository](https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags)**