On 2/21/24 2:41 AM, Shinichiro Kawasaki wrote:
Thanks for this v2. I confirmed nvme/039 passes with this patch on my test
system. Good.
On Feb 20, 2024 / 15:30, Alan Adamson wrote:
Tests the ability to enable and disable error logging for passthru admin commands issued to
the controller and passthru IO commands issued to a namespace.
These tests will only run on 6.8.0 and greater kernels.
This v2 uses the kernel version as the condition to run passthru tests. But I
think sysfs file check is much simpler and more accurate. Please see my comment
below.
[...]
diff --git a/tests/nvme/039 b/tests/nvme/039
index 73b53d0b949c..38a866417db9 100755
--- a/tests/nvme/039
+++ b/tests/nvme/039
[...]
@@ -155,6 +197,26 @@ test_device() {
inject_invalid_status_on_read "${ns_dev}"
inject_write_fault_on_write "${ns_dev}"
+ if [ $RUN_PASSTHRU_TESTS -ne 0 ]; then
The line above can be:
if [ -e "$TEST_DEV_SYSFS/passthru_err_log_enabled" ]; then
Then RUN_PASSTHRU_TESTS and check_kver680_for_passthru_tests() are not required.
That makes sense. I'll make this change.
Thanks,
Alan