• Home
  • Raw
  • Download

Lines Matching +full:check +full:- +full:api +full:- +full:version

1 .. SPDX-License-Identifier: GPL-2.0-or-later
11 --------------------------------------
26 It's a good idea to make the test as self-contained as possible too, ideally
39 Choosing a good name for an API functions or even variables is a difficult
50 Do not over-comment
55 drifted slowly apart which yielded into API misuses and hard to find bugs.
67 paragraph with high-level test description at the beginning of the file right
86 --------------
88 LTP adopted `Linux kernel coding style <https://www.kernel.org/doc/html/latest/process/coding-style…
89 Run ``make check`` in the test's directory and/or use ``make check-$TCID``, it
90 uses (among other checks) our vendoring version of
95 If ``make check`` does not report any problems, the code still may be wrong
98 The following linting code can be found when we run ``make check``:
100 .. list-table::
101 :header-rows: 1
103 * - Linting code
104 - Message
105 - Explanation
107 * - LTP-001
108 - Library source files have ``tst_`` prefix
109 - API source code is inside headers in ``include/{empty}*.h``,
114 * - LTP-002
115 - ``TST_RET`` and ``TST_ERR`` are never modified by test library functions
116 - The test author is guaranteed that the test API will not modify these
118 errno are overwritten before the test has chance to check them.
124 * - LTP-003
125 - Externally visible library symbols have the ``tst_`` prefix
126 - Functions, types and variables in the public test API should have the
132 * - LTP-004
133 - Test executable symbols are marked ``static``
134 - Test executables should not export symbols unnecessarily. This means
135 that all top-level variables and functions should be marked with the
139 * - LTP-005
140 - Array must terminate with a sentinel value (i.e. ``NULL`` or ``{}``)
141 - When defining arrays in the ``struct tst_test`` structure, we need to
145 ------------------
153 functions and ``-o`` and ``-a`` test parameters (that are marked as obsolete in
161 Run ``make check`` in the test's directory and/or use ``make check-$TCID.sh``.
162 It uses (among other checks) our vendoring version of
164 from Debian that is used to check for non-portable shell code.
168 If ``make check`` does not report any problems the code still may be wrong,
199 * Checking the ``errno`` value is another type of runtime check. Most of the
203 * LTP has kernel version detection that can be used to disable tests at runtime.
204 Unfortunately, the kernel version does not always corresponds to a well
206 while the kernel version stays the same. Use with caution.
232 Code contributed to LTP should be licensed under GPLv2+ (GNU GPL version 2 or
233 any later version).
235 Use ``SPDX-License-Identifier: GPL-2.0-or-later``
238 -------------
266 .. code-block:: bash
269 splice02 splice02 -s 20
284 ---------
294 .. code-block:: c
302 Sub-executables
317 ---------------------------
319 #. Test compiles and it runs fine (check with ``-i 10`` and ``-i 0`` too)
320 #. ``make check`` should not emit any warnings for the test you are working on
321 (hint: run it in the test's directory and/or use ``make check-$TCID``)
336 Testing pre-release kernel features
337 -----------------------------------
344 ----------------------------------
349 architectures using cross-compilation. For a full list of tested distros, please
350 check :master:`.github/workflows/ci-docker-build.yml`.
356 The CI also checks for code linting, running ``make check`` in the whole
359 LTP C And Shell Test API Comparison
360 -----------------------------------
362 .. list-table::
363 :header-rows: 1
365 * - C API ``struct tst_test`` members
366 - Shell API ``$TST_*`` variables
368 * - .all_filesystems
369 - TST_ALL_FILESYSTEMS
371 * - .bufs
372 - \-
374 * - .caps
375 - \-
377 * - .child_needs_reinit
378 - not applicable
380 * - .cleanup
381 - TST_CLEANUP
383 * - .dev_extra_opts
384 - TST_DEV_EXTRA_OPTS
386 * - .dev_fs_opts
387 - TST_DEV_FS_OPTS
389 * - .dev_fs_type
390 - TST_FS_TYPE
392 * - .dev_min_size
393 - TST_DEVICE_SIZE
395 * - .format_device
396 - TST_FORMAT_DEVICE
398 * - .max_runtime
399 - \-
401 * - .min_cpus
402 - not applicable
404 * - .min_kver
405 - TST_MIN_KVER
407 * - .min_mem_avail
408 - not applicable
410 * - .mnt_flags
411 - TST_MNT_PARAMS
413 * - .min_swap_avail
414 - not applicable
416 * - .mntpoint | .mnt_data
417 - TST_MNTPOINT
419 * - .mount_device
420 - TST_MOUNT_DEVICE
422 * - .needs_cgroup_ctrls
423 - \-
425 * - .needs_checkpoints
426 - TST_NEEDS_CHECKPOINTS
428 * - .needs_cmds
429 - TST_NEEDS_CMDS
431 * - .needs_devfs
432 - \-
434 * - .needs_device
435 - TST_NEEDS_DEVICE
437 * - .needs_drivers
438 - TST_NEEDS_DRIVERS
440 * - .needs_kconfigs
441 - TST_NEEDS_KCONFIGS
443 * - .needs_overlay
444 - \-
446 * - .needs_rofs
447 - \-
449 * - .needs_root
450 - TST_NEEDS_ROOT
452 * - .needs_tmpdir
453 - TST_NEEDS_TMPDIR
455 * - .options
456 - TST_PARSE_ARGS | TST_OPTS
458 * - .resource_files
459 - \-
461 * - .restore_wallclock
462 - not applicable
464 * - .sample
465 - \-
467 * - .save_restore
468 - \-
470 * - .scall
471 - not applicable
473 * - .setup
474 - TST_SETUP
476 * - .skip_filesystems
477 - TST_SKIP_FILESYSTEMS
479 * - .skip_in_compat
480 - \-
482 * - .skip_in_lockdown
483 - TST_SKIP_IN_LOCKDOWN
485 * - .skip_in_secureboot
486 - TST_SKIP_IN_SECUREBOOT
488 * - .supported_archs
489 - not applicable
491 * - .tags
492 - \-
494 * - .taint_check
495 - \-
497 * - .tcnt
498 - TST_CNT
500 * - .tconf_msg
501 - not applicable
503 * - .test | .test_all
504 - TST_TESTFUNC
506 * - .test_variants
507 - \-
509 * - .timeout
510 - TST_TIMEOUT
512 * - .tst_hugepage
513 - not applicable
515 * - .ulimit
516 - not applicable
518 * - not applicable
519 - TST_NEEDS_KCONFIGS_IFS
521 * - not applicable
522 - TST_NEEDS_MODULE
524 * - not applicable
525 - TST_POS_ARGS
527 * - not applicable
528 - TST_USAGE
530 .. list-table::
531 :header-rows: 1
533 * - C API other structs
534 - Shell API ``$TST_*`` variables
536 * - struct tst_device
537 - TST_DEVICE