aboutsummaryrefslogtreecommitdiff
path: root/doc/schema-boot.rst
blob: 82c3d60577417c8775ac43b1b6612e39e843b3c4 (plain)
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
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
.. _schema_boot:

boot
----

.. _schema_boot_get:

GET
***

A boot ``name`` is composed from the name of the board, job, kernel, defconfig
and architecture values: ``board``-``job``-``kernel``-``defconfig``-``arch``.

Boot report ``name``-s are not unique. To uniquely identify a boot report it is
necessary to use its ``_id`` value.

::

    {
        "title": "boot",
        "description": "A boot report object",
        "type": "object",
        "properties": {
            "name": {
                "type": "string",
                "description": "The name of this boot report (internally created)"
            },
            "_id": {
                "type": "string",
                "description": "The ID associated with the object as provided by mongodb"
            },
            "created_on": {
                "type": "object",
                "description": "Creation date of the object",
                "properties": {
                    "$date": {
                        "type": "number",
                        "description": "Milliseconds from epoch time",
                        "format": "utc-millisec"
                    }
                }
            },
            "board": {
                "type": "string",
                "description": "The name of the board"
            },
            "board_instance": {
                "type": "string",
                "description": "The instance identifier for the board"
            },
            "job": {
                "type": "string",
                "description": "The job associated with this object"
            },
            "job_id": {
                "type": "object",
                "description": "The ID of the associated job",
                "properties": {
                    "$oid": {
                        "type": "string",
                        "description": "The actual ID value"
                    }
                }
            },
            "kernel": {
                "type": "string",
                "description": "The kernel associated with this object"
            },
            "defconfig": {
                "type": "string",
                "description": "The name of the defconfig as reported by the CI loop"
            },
            "defconfig_full": {
                "type": "string",
                "description": "The full name of the defconfig, can contain also config fragments information",
                "default": "The defconfig value"
            },
            "defconfig_id": {
                "type": "object",
                "description": "The ID of the associated build report",
                "properties": {
                    "$oid": {
                        "type": "string",
                        "description": "The actual ID value"
                    }
                }
            },
            "arch" : {
                "type": "string",
                "description": "The architecture type of this board",
                "enum": ["arm", "arm64", "x86"],
                "default": "arm"
            },
            "git_branch": {
                "type": "string",
                "description": "The branch used for boot testing"
            },
            "git_commit": {
                "type": "string",
                "description": "The git SHA of the commit used for boot testing"
            },
            "git_describe": {
                "type": "string",
                "description": "The name of the git describe command"
            },
            "lab_name": {
                "type": "string",
                "description": "The name of the lab that is doing the boot tests"
            },
            "time": {
                "type": "object",
                "description": "Time taken to boot the board",
                "properties": {
                    "$date": {
                        "type": "number",
                        "description": "Milliseconds from epoch time",
                        "format": "utc-millisec"
                    }
                }
            },
            "status": {
                "type": "string",
                "description": "The status of the boot report",
                "enum": ["FAIL", "OFFLINE", "PASS", "UNTRIED"]
            },
            "warnings": {
                "type": "number",
                "description": "Number of warnings in the boot phase"
            },
            "boot_log": {
                "type": "string",
                "description": "Name of the boot log text file"
            },
            "boot_log_html": {
                "type": "string",
                "description": "Name of the boot log HTML file"
            },
            "initrd_addr": {
                "type": "string",
                "description": "Initrd address used"
            },
            "initrd": {
                "type": "string",
                "description": "Initrd path"
            },
            "load_addr": {
                "type": "string",
                "description": "Load address used"
            },
            "kernel_image": {
                "type": "string",
                "description": "The kernel image used to boot"
            },
            "dtb_addr": {
                "type": "string",
                "description": "The DTB address used"
            },
            "dtb": {
                "type": "string",
                "description": "The DTB file or directory used"
            },
            "endian": {
                "type": "string",
                "description": "Endianness of the board"
            },
            "fastboot": {
                "type": "boolean",
                "description": "If it was a fastboot"
            },
            "boot_result_description": {
                "type": "string",
                "description": "The description of the boot result, useful to provide a cause of a failure"
            },
            "retries": {
                "type": "integer",
                "description": "The number of boot retries that have been performed",
                "default": 0
            },
            "version": {
                "type": "string",
                "description": "The version of this JSON schema: depends on the POST request"
            },
            "file_server_url": {
                "type": "string",
                "description": "The URL where boot log files, or other related files, are stored"
            },
            "file_server_resource": {
                "type": "string",
                "description": "The server path where the boot related files are stored"
            },
            "mach": {
                "type": "string",
                "description": "The machine (SoC) family"
            },
            "metadata": {
                "type": "object",
                "description": "A free form object that can contain different properties"
            },
            "uimage": {
                "type": "string",
                "description": "Path to the uImage used"
            },
            "uimage_addr": {
                "type": "string",
                "description": "uImage load address"
            },
            "qemu": {
                "type": "string",
                "description": "qemu binary used"
            },
            "qemu_command": {
                "type": "string",
                "description": "Full command line used to start qemu"
            }
        }
    }

.. _schema_boot_post:

POST
****

The following schema defines the valid fields that a boot report document should
have when sent to the server.

::

    {
        "title": "boot",
        "description": "A boot POST request object",
        "type": "object",
        "properties": {
            "version": {
                "type": "string",
                "description": "The version number of this JSON schema",
                "enum": ["1.0"]
            },
            "lab_name": {
                "type": "string",
                "description": "The name of the lab that is doing the boot tests"
            },
            "job": {
                "type": "string",
                "description": "The job associated with this boot report"
            },
            "kernel": {
                "type": "string",
                "description": "The kernel associated with this boot report"
            },
            "defconfig": {
                "type": "string",
                "description": "The name of the defconfig as reported by the CI loop"
            },
            "defconfig_full": {
                "type": "string",
                "description": "The full name of the defconfig with config fragments information",
                "default": "The defconfig value"
            },
            "board": {
                "type": "string",
                "description": "The name of the board: it must be a valid and recognized name"
            },
            "board_instance": {
                "type": "string",
                "description": "The instance identifier for the board"
            },
            "arch" : {
                "type": "string",
                "description": "The architecture type of this board",
                "enum": ["arm", "arm64", "x86"],
                "default": "arm"
            },
            "git_branch": {
                "type": "string",
                "description": "The branch used for boot testing"
            },
            "git_commit": {
                "type": "string",
                "description": "The git SHA of the commit used for boot testing"
            },
            "git_describe": {
                "type": "string",
                "description": "The name of the git describe command"
            },
            "boot_retries": {
                "type": "integer",
                "description": "The number of boot retries that have been performed",
                "default": 0
            },
            "boot_result": {
                "type": "string",
                "description": "The final status of the boot test",
                "enum": ["FAIL", "OFFLINE", "PASS", "UNTRIED"]
            },
            "boot_result_description": {
                "type": "string",
                "description": "The description of the boot result, useful to provide a cause of a failure"
            },
            "boot_log": {
                "type": "string",
                "description": "The name of the boot log file in text format"
            },
            "boot_log_html": {
                "type": "string",
                "description": "The name of the boot log file in HTML format"
            },
            "boot_time": {
                "type": "number",
                "description": "The number of seconds it took to boot the board: iternally it will be converted into milliseconds from the epoch time"
            },
            "boot_warnings": {
                "type": "integer",
                "description": "The number of warnings detected during the boot",
                "default": 0
            },
            "dtb": {
                "type": "string",
                "description": "The DTB file or directory used"
            },
            "dtb_addr": {
                "type": "string",
                "description": "The DTB address used"
            },
            "dtb_append": {
                "type": "boolean",
                "default": "false"
            },
            "endian": {
                "type": "string",
                "description": "Endianness of the board"
            },
            "fastboot": {
                "type": "boolean",
                "description": "If it was a fastboot",
                "default": "false"
            },
            "initrd_addr": {
                "type": "string",
                "description": "Initrd address used"
            },
            "initrd": {
                "type": "string",
                "description": "Initrd path"
            },
            "kernel_image": {
                "type": "string",
                "description": "The kernel image used to boot"
            },
            "loadaddr": {
                "type": "string",
                "description": "Load address used"
            },
            "email": {
                "type": "string",
                "description": "Optional email address to be notified if the boot report import fails"
            },
            "file_server_url": {
                "type": "string",
                "description": "The URL where boot log files, or other related files, are stored"
            },
            "file_server_resource": {
                "type": "string",
                "description": "The server path where the boot related files are stored"
            },
            "mach": {
                "type": "string",
                "description": "The machine (SoC) family"
            },
            "metadata": {
                "type": "object",
                "description": "A free form object that can contain different properties"
            },
            "uimage": {
                "type": "string",
                "description": "Path to the uImage used"
            },
            "uimage_addr": {
                "type": "string",
                "description": "uImage load address"
            },
            "qemu": {
                "type": "string",
                "description": "qemu binary used"
            },
            "qemu_command": {
                "type": "string",
                "description": "Full command line used to start qemu"
            }
        },
        "required": ["version", "lab_name", "job", "kernel", "defconfig", "board", "arch"]
    }

Notes
+++++

* ``defconfig_full``: This field should be used to specify the full defconfig name if config fragments have been used. It should not contain the architecture (``arch``) value. If not defined, the ``defconfig`` value will be used. Its value should conform to: ``defconfig[+fragment[+fragment ... ]]``.

* ``file_server_url``, ``file_server_resource``: These field should be used to provide the base URL and the actual path where boot related files (i.e. boot logs) are stored. ``file_server_url`` defines the base path, like ``http://storage.kernelci.org/``, ``file_server_resource`` defines the path on the server, like ``kernel-ci/next/``. When both resources are available, they should be joined together with the file names to form the actual URL. Implementation and default values are left to the user or the visualization tool using the data.

More Info
*********

* :ref:`Boot resource <collection_boot>`
* :ref:`Defconfig schema <schema_defconfig>`
* :ref:`API results <intro_schema_results>`
* :ref:`Schema time and date <intro_schema_time_date>`