new file mode 100755
@@ -0,0 +1,50 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-3.0+
+# Copyright (c) 2024 FUJITSU LIMITED. All Rights Reserved.
+#
+# Commit 667db86bcbe8 ("RDMA/rtrs: Register ib event handler") introduced a
+# new element .deinit but never used it at all that lead to a
+# 'list_add corruption' kernel warning.
+#
+# This test is intended to check whether the current kernel is affected.
+# The following patch is able to fix this issue.
+# RDMA/rtrs: Add missing deinit() call
+#
+. tests/rnbd/rc
+
+DESCRIPTION="Start Stop RNBD repeatly"
+CHECK_DMESG=1
+QUICK=1
+
+requires() {
+ _have_rnbd
+ _have_loop
+}
+
+test_start_stop()
+{
+ _setup_rnbd || return
+
+ local loop_dev i j=0
+ loop_dev="$(losetup -f)"
+
+ for ((i=0;i<100;i++))
+ do
+ _start_rnbd_client "${loop_dev}" &>/dev/null
+ # Always stop it so that the next start has change to work
+ _stop_rnbd_client &>/dev/null && ((j++))
+ done
+
+ # We expect at least 10% start/stop successfully
+ if [[ $j -lt 10 ]]; then
+ echo "Failed: $j/$i"
+ fi
+
+ _cleanup_rnbd
+}
+
+test() {
+ echo "Running ${TEST_NAME}"
+ test_start_stop
+ echo "Test complete"
+}
new file mode 100644
@@ -0,0 +1,2 @@
+Running rnbd/002
+Test complete