Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

  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
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811

h_run()
{
	file="$(atf_get_srcdir)/tests/${1}"

	export COLUMNS=80
	export LINES=24
	$(atf_get_srcdir)/director $2 \
	    -T $(atf_get_srcdir) \
	    -t atf \
	    -I $(atf_get_srcdir)/tests \
	    -C $(atf_get_srcdir)/check_files \
	    -s $(atf_get_srcdir)/slave $file || atf_fail "test ${file} failed"
}

atf_test_case startup
startup_head()
{
	atf_set "descr" "Checks curses initialisation sequence"
}
startup_body()
{
	h_run start
}

atf_test_case addch
addch_head()
{
	atf_set "descr" "Tests adding a chtype to stdscr"
}
addch_body()
{
	h_run addch
}

atf_test_case addchstr
addchstr_head()
{
	atf_set "descr" "Tests adding a chtype string to stdscr"
}
addchstr_body()
{
	h_run addchstr
}

atf_test_case addchnstr
addchnstr_head()
{
	atf_set "descr" "Tests adding bytes from a chtype string to stdscr"
}
addchnstr_body()
{
	h_run addchnstr
}

atf_test_case addstr
addstr_head()
{
	atf_set "descr" "Tests adding bytes from a string to stdscr"
}
addstr_body()
{
	h_run addstr
}

atf_test_case addnstr
addnstr_head()
{
	atf_set "descr" "Tests adding bytes from a string to stdscr"
}
addnstr_body()
{
	h_run addnstr
}

atf_test_case getch
getch_head()
{
	atf_set "descr" "Checks reading a character input"
}
getch_body()
{
	h_run getch
}

atf_test_case timeout
timeout_head()
{
	atf_set "descr" "Checks timeout when reading a character"
}
timeout_body()
{
	h_run timeout
}

atf_test_case window
window_head()
{
	atf_set "descr" "Checks window creation"
}
window_body()
{
	h_run window
}

atf_test_case wborder
wborder_head()
{
	atf_set "descr" "Checks drawing a border around a window"
}
wborder_body()
{
	h_run wborder
}

atf_test_case box
box_head()
{
	atf_set "descr" "Checks drawing a box around a window"
}
box_body()
{
	h_run box
}

atf_test_case wprintw
wprintw_head()
{
	atf_set "descr" "Checks printing to a window"
}
wprintw_body()
{
	h_run wprintw
}

atf_test_case wscrl
wscrl_head()
{
	atf_set "descr" "Check window scrolling"
}
wscrl_body()
{
	h_run wscrl
}

atf_test_case mvwin
mvwin_head()
{
	atf_set "descr" "Check moving a window"
}
mvwin_body()
{
	h_run mvwin
}

atf_test_case getstr
getstr_head()
{
	atf_set "descr" "Check getting a string from input"
}
getstr_body()
{
	h_run getstr
}

atf_test_case termattrs
termattrs_head()
{
	atf_set "descr" "Check the terminal attributes"
}
termattrs_body()
{
	h_run termattrs
}

atf_test_case assume_default_colors
assume_default_colors_head()
{
	atf_set "descr" "Check setting the default color pair"
}
assume_default_colors_body()
{
	h_run assume_default_colors
}

atf_test_case attributes
attributes_head()
{
	atf_set "descr" "Check setting, clearing and getting of attributes"
}
attributes_body()
{
	h_run attributes
}

atf_test_case beep
beep_head()
{
	atf_set "descr" "Check sending a beep"
}
beep_body()
{
	h_run beep
}

atf_test_case background
background_head()
{
	atf_set "descr" "Check setting background character and attributes for both stdscr and a window."
}
background_body()
{
	h_run background
}

atf_test_case can_change_color
can_change_color_head()
{
	atf_set "descr" "Check if the terminal can change colours"
}
can_change_color_body()
{
	h_run can_change_color
}

atf_test_case cbreak
cbreak_head()
{
	atf_set "descr" "Check cbreak mode works"
}
cbreak_body()
{
	h_run cbreak
}

atf_test_case chgat
chgat_head()
{
	atf_set "descr" "Check changing attributes works"
}
chgat_body()
{
	h_run chgat
}

atf_test_case clear
clear_head()
{
	atf_set "descr" "Check clear and erase work"
}
clear_body()
{
	h_run clear
}

atf_test_case copywin
copywin_head()
{
	atf_set "descr" "Check all the modes of copying a window work"
}
copywin_body()
{
	h_run copywin
}

atf_test_case curs_set
curs_set_head()
{
	atf_set "descr" "Check setting the cursor visibility works"
}
curs_set_body()
{
	h_run curs_set
}

atf_test_case define_key
define_key_head()
{
	atf_set "descr" "Check defining a key and removing the definition works"
}
define_key_body()
{
	h_run define_key
}

atf_test_case delay_output
delay_output_head()
{
	atf_set "descr" "Check that padding is inserted when delaying output"
}
delay_output_body()
{
	h_run delay_output -v
}

atf_test_case derwin
derwin_head()
{
	atf_set "descr" "Check derived subwindow creation behaves correctly."
}
derwin_body()
{
	h_run derwin
}

atf_test_case doupdate
doupdate_head()
{
	atf_set "descr" "Check doupdate performs an update"
}
doupdate_body()
{
	h_run doupdate
}

atf_test_case dupwin
dupwin_head()
{
	atf_set "descr" "Check duplicating a window works"
}
dupwin_body()
{
	h_run dupwin
}

atf_test_case erasechar
erasechar_head()
{
	atf_set "descr" "Validate erase char can be retrieved"
}
erasechar_body()
{
	h_run erasechar
}

atf_test_case flash
flash_head()
{
	atf_set "descr" "Validate curses can flash the screen"
}
flash_body()
{
	h_run flash
}

atf_test_case getattrs
getattrs_head()
{
	atf_set "descr" "Validate curses can get and set attributes on a window"
}
getattrs_body()
{
	h_run getattrs
}

atf_test_case bkgdset
bkgdset_head()
{
	atf_set "descr" "Validate curses set the background attributes on stdscr"
}
bkgdset_body()
{
	h_run bkgdset
}

atf_test_case getbkgd
getbkgd_head()
{
	atf_set "descr" "Validate curses getting the background attributes on stdscr"
}
getbkgd_body()
{
	h_run getbkgd
}

atf_test_case getcurx
getcurx_head()
{
	atf_set "descr" "Validate curses getting cursor locations in a window"
}
getcurx_body()
{
	h_run getcurx
}

atf_test_case getmaxx
getmaxx_head()
{
	atf_set "descr" "Validate curses getting the maximum x value of a window"
}
getmaxx_body()
{
	h_run getmaxx
}

atf_test_case getmaxy
getmaxy_head()
{
	atf_set "descr" "Validate curses getting the maximum y value of a window"
}
getmaxy_body()
{
	h_run getmaxy
}

atf_test_case getnstr
getnstr_head()
{
	atf_set "descr" "Check getting a string with a limit"
}
getnstr_body()
{
	h_run getnstr
}

atf_test_case getparx
getparx_head()
{
	atf_set "descr" "Check getting the location of a window relative to its parent"
}
getparx_body()
{
	h_run getparx
}

atf_test_case has_colors
has_colors_head()
{
	atf_set "descr" "Check if the terminal can support colours"
}
has_colors_body()
{
	h_run has_colors
}

atf_test_case has_ic
has_ic_head()
{
	atf_set "descr" "Check if the terminal can insert characters and lines"
}
has_ic_body()
{
	h_run has_ic
}

atf_test_case hline
hline_head()
{
	atf_set "descr" "Draw a horizontal line"
}
hline_body()
{
	h_run hline
}

atf_test_case inch
inch_head()
{
	atf_set "descr" "Get the character under the cursor on stdscr"
}
inch_body()
{
	h_run inch
}

atf_test_case inchnstr
inchnstr_head()
{
	atf_set "descr" "Get a limited chtype string from the screen"
}
inchnstr_body()
{
	h_run inchnstr
}

atf_test_case init_color
init_color_head()
{
	atf_set "descr" "Set a custom color entry"
}
init_color_body()
{
	h_run init_color
}

atf_test_case innstr
innstr_head()
{
	atf_set "descr" "Get a limited string starting at the cursor"
}
innstr_body()
{
	h_run innstr
}

atf_test_case is_linetouched
is_linetouched_head()
{
	atf_set "descr" "Check if a line has been modified in a window"
}
is_linetouched_body()
{
	h_run is_linetouched
}

atf_test_case is_wintouched
is_wintouched_head()
{
	atf_set "descr" "Check if a window has been modified"
}
is_wintouched_body()
{
	h_run is_wintouched
}

atf_test_case keyname
keyname_head()
{
	atf_set "descr" "Convert integers into printable key names"
}
keyname_body()
{
	h_run keyname
}

atf_test_case keyok
keyok_head()
{
	atf_set "descr" "Check the ability to disable interpretation of a multichar key sequence"
}
keyok_body()
{
	h_run keyok
}

atf_test_case killchar
killchar_head()
{
	atf_set "descr" "Get the value of the terminals kill character"
}
killchar_body()
{
	h_run killchar
}

atf_test_case meta
meta_head()
{
	atf_set "descr" "Check setting and clearing the meta flag on a window"
}
meta_body()
{
	h_run meta
}

atf_test_case mvaddch
mvaddch_head()
{
	atf_set "descr" "Move the cursor and add a character to stdscr"
}
mvaddch_body()
{
	h_run mvaddch
}

atf_test_case mvaddchnstr
mvaddchnstr_head()
{
	atf_set "descr" "Move the cursor and add a character string to stdscr"
}
mvaddchnstr_body()
{
	h_run mvaddchnstr
}

atf_test_case mvaddchstr
mvaddchstr_head()
{
	atf_set "descr" "Move the cursor and add a ch string to stdscr"
}
mvaddchstr_body()
{
	h_run mvaddchstr
}

atf_test_case mvaddnstr
mvaddnstr_head()
{
	atf_set "descr" "Move the cursor and add a limited string to stdscr"
}
mvaddnstr_body()
{
	h_run mvaddnstr
}

atf_test_case mvaddstr
mvaddstr_head()
{
	atf_set "descr" "Move the cursor and add a string to stdscr"
}
mvaddstr_body()
{
	h_run mvaddstr
}

atf_test_case mvchgat
mvchgat_head()
{
	atf_set "descr" "Change the attributes on the screen"
}
mvchgat_body()
{
	h_run mvchgat
}

atf_test_case mvcur
mvcur_head()
{
	atf_set "descr" "Move the cursor on the screen"
}
mvcur_body()
{
	h_run mvcur
}

atf_test_case mvderwin
mvderwin_head()
{
	atf_set "descr" "Move the mapping of a region relative to the parent"
}
mvderwin_body()
{
	h_run mvderwin
}

atf_test_case mvgetnstr
mvgetnstr_head()
{
	atf_set "descr" "Move the cursor and get a limited number of characters"
}
mvgetnstr_body()
{
	h_run mvgetnstr
}

atf_test_case mvgetstr
mvgetstr_head()
{
	atf_set "descr" "Move the cursor and get characters"
}
mvgetstr_body()
{
	h_run mvgetstr
}

atf_test_case mvhline
mvhline_head()
{
	atf_set "descr" "Move the cursor and draw a horizontal line"
}
mvhline_body()
{
	h_run mvhline
}

atf_test_case mvinchnstr
mvinchnstr_head()
{
	atf_set "descr" "Move the cursor read characters - tests both mvinchstr and mvinchnstr"
}
mvinchnstr_body()
{
	h_run mvinchnstr
}

atf_test_case mvprintw
mvprintw_head()
{
	atf_set "descr" "Move the cursor and print a string"
}
mvprintw_body()
{
	h_run mvprintw
}

atf_test_case mvscanw
mvscanw_head()
{
	atf_set "descr" "Move the cursor and scan for input patterns"
}
mvscanw_body()
{
	h_run mvscanw
}

atf_test_case mvvline
mvvline_head()
{
	atf_set "descr" "Move the cursor and draw a vertical line"
}
mvvline_body()
{
	h_run mvvline
}

atf_test_case pad
pad_head()
{
	atf_set "descr" "Test the newpad, subpad, pnoutrefresh and prefresh functions"
}
pad_body()
{
	h_run pad
}

atf_test_case nocbreak
nocbreak_head()
{
	atf_set "descr" "Test that the nocbreak call returns the terminal to canonical character processing"
}
nocbreak_body()
{
	h_run nocbreak
}

atf_test_case nodelay
nodelay_head()
{
	atf_set "descr" "Test that the nodelay call causes wget to not block"
}
nodelay_body()
{
	h_run nodelay
}

atf_init_test_cases()
{
	atf_add_test_case startup
	atf_add_test_case addch
	atf_add_test_case addchstr
	atf_add_test_case addchnstr
	atf_add_test_case addstr
	atf_add_test_case addnstr
	atf_add_test_case getch
	atf_add_test_case timeout
	atf_add_test_case window
	atf_add_test_case wborder
	atf_add_test_case box
	atf_add_test_case wprintw
	atf_add_test_case wscrl
	atf_add_test_case mvwin
	atf_add_test_case getstr
	atf_add_test_case termattrs
	atf_add_test_case can_change_color
	atf_add_test_case assume_default_colors
	atf_add_test_case attributes
	atf_add_test_case beep
	atf_add_test_case background
	atf_add_test_case cbreak
	atf_add_test_case chgat
	atf_add_test_case clear
	atf_add_test_case copywin
	atf_add_test_case curs_set
	atf_add_test_case define_key
#	atf_add_test_case delay_output # not working
	atf_add_test_case derwin
	atf_add_test_case doupdate
	atf_add_test_case dupwin
	atf_add_test_case erasechar
	atf_add_test_case flash
	atf_add_test_case getattrs
	atf_add_test_case bkgdset
	atf_add_test_case getbkgd
	atf_add_test_case getcurx
	atf_add_test_case getmaxx
	atf_add_test_case getmaxy
	atf_add_test_case getnstr
	atf_add_test_case getparx
	atf_add_test_case has_colors
	atf_add_test_case has_ic
	atf_add_test_case hline
	atf_add_test_case inch
	atf_add_test_case inchnstr
	atf_add_test_case init_color
	atf_add_test_case innstr
	atf_add_test_case is_linetouched
	atf_add_test_case is_wintouched
	atf_add_test_case keyname
	atf_add_test_case keyok
	atf_add_test_case killchar
	atf_add_test_case meta
	atf_add_test_case mvaddch
	atf_add_test_case mvaddchnstr
	atf_add_test_case mvaddchstr
	atf_add_test_case mvaddnstr
	atf_add_test_case mvaddstr
	atf_add_test_case mvchgat
	atf_add_test_case mvcur
	atf_add_test_case mvderwin
	atf_add_test_case mvgetnstr
	atf_add_test_case mvgetstr
	atf_add_test_case mvhline
	atf_add_test_case mvinchnstr
	atf_add_test_case mvprintw
	atf_add_test_case mvscanw
	atf_add_test_case mvvline
	atf_add_test_case pad
	atf_add_test_case nocbreak
	atf_add_test_case nodelay
}