[LU-11819] Combine common test script code into library and add ability to skip tests in tests/*.c Created: 20/Dec/18  Updated: 19/Apr/22

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: James Nunez (Inactive) Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: test_script_improvements, tests

Rank (Obsolete): 9223372036854775807

 Description   

There are several Lustre test scripts that run tests from an external program. These executables are themselves composed of several test routines. The test suites and test numbers that call these programs are:
sanity test_27D runs tests from llapi_layout_test.c
sanity test_154g runs tests from llapi_fid_test.c
sanity test_243 runs tests from group_lock_test.c
sanity test_244 runs tests from sendfile_grouplock.c
sanity test_255c runs tests from lockahead_test.c
sanity test_405 runs tests from swap_lock_test.c
sanity-hsm test_500 runs tests from llapi_hsm_test.c
sanityn test 18 runs tests from mmap_sanity.c

These external routines will sometimes fail in known situations. For example, sanity test 405 subtest 16 fails when a client mounts a Lustre file system subdirectory; see https://testing.whamcloud.com/test_sets/37edc450-e915-11e8-b67f-52540065bddc . In these situations, we’d like to skip the test during testing instead of it failing.

llapi_layout_test.c and mmap_sanity.c have the ability to skip tests. All others do not have the ability to skip tests.

We should pull out all the common routines, structures, etc. from each of these test (.c) programs and create a library that they can link to. If we pull out the skip ability from llapi_layout_test.c and mmap_sanity.c, then we can implement this in all the other programs.

This work will cut down on code duplication and add more flexibility to our testing.



 Comments   
Comment by Gerrit Updater [ 29/Jan/19 ]

James Nunez (jnunez@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34133
Subject: LU-11819 tests: combine similar functionality in lib
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 94a0de78aa9aea1fafc070a335ee54185e738c9f

Generated at Sat Feb 10 02:47:12 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.