Whamcloud - gitweb
LU-16763 obdclass: add unit tests for OBD life cycle 03/51103/7
authorTimothy Day <timday@amazon.com>
Fri, 12 May 2023 04:32:53 +0000 (04:32 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 6 Sep 2023 06:17:43 +0000 (06:17 +0000)
commit27ee4eaf1b4ec82d58cf03e6e3c715e8e294c5a6
tree436f1db445ada1e39c2e26a370f57cd0def97f45
parentb034dd27dd39483e40f91ea82d3f5c62b514ec54
LU-16763 obdclass: add unit tests for OBD life cycle

Add some simple OBD life cycle tests. These tests
consist of a kernel module which defines a simple OBD
device, and a few sanity tests. The new OBD device
print logs validating that it has been loaded
correctly. Unlike other OBD devices, this one has
minimal side-effects. The new test OBD device has
been added to the test rpm and dkms.

sanity/55a aims to test that a device can loaded
properly and found by the various OBD device search
functions.

sanity/55b aims to load the maximum number of allowed
OBD devices, which is currently 8192. It also times how
long it takes to perform the loading and unloading. In
the future, this could be used to test for performance
regression.

The tests avoid using any userspace function, like lctl
or lfs, since I noticed bugs when using them with a large
number of devices. Follow-up patches will include fixes
and more testing.

I used a variation of these tests when debugging
sanity/60a failures, and when debugging removing
MAX_OBD_DEVICES.

This test (obd_test.c) and the llog test (llog_test.c)
should probably be moved to a different directory in a
follow-up patch.

Test-Parameters: trivial testlist=sanity env=ONLY=55,ONLY_REPEAT=25
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ibc347ac962c59a4bbc26410c30f9cc5529e6c84d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51103
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre.spec.in
lustre/obdclass/Makefile.in
lustre/obdclass/autoMakefile.am
lustre/obdclass/obd_test.c [new file with mode: 0644]
lustre/scripts/dkms.mkconf
lustre/tests/sanity.sh
rpm/kmp-lustre-tests.files