[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH blktests] nbd/rc: redirect nbd-server stderr



Recent nbd commit da5e07c057ab ("Reimplement daemonize() without using
daemon()") changed how nbd-server daemonizes itself. After this commit,
nbd-server prints messages to stderr after daemonization. This caused
nbd test cases to fail due to unexpected stderr output.

nbd/001 (resize a connected nbd device)                      [failed]
    runtime  0.865s  ...  0.883s
    --- tests/nbd/001.out	2025-04-22 13:13:27.727873155 +0900
    +++ /home/shin/Blktests/blktests/results/nodev/nbd/001.out.bad	2026-05-15 11:44:46.269000000 +0900
    @@ -1,4 +1,5 @@
     Running nbd/001
    +Error: Session terminated by client
     Disk /dev/nbd0: 10.7GB
     nbd0 43:0 0 10G 0 disk
     Setting size to 1gib

The commit is in nbd version v3.27, which is included in Fedora 44.

To avoid the failures, redirect nbd-server stderr to .full files.

Link: https://github.com/NetworkBlockDevice/nbd/commit/da5e07c057ab
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 tests/nbd/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/nbd/rc b/tests/nbd/rc
index e200ba6..6205c49 100644
--- a/tests/nbd/rc
+++ b/tests/nbd/rc
@@ -72,7 +72,7 @@ allowlist=true
 [export]
 exportname=${TMPDIR}/export
 EOF
-	nbd-server -p "${TMPDIR}/nbd.pid" -C "${TMPDIR}/nbd.conf"
+	nbd-server -p "${TMPDIR}/nbd.pid" -C "${TMPDIR}/nbd.conf" 2> "$FULL"
 
 	# Wait for nbd-server start listening the port
 	for ((i = 0; i < 100; i++)); do
-- 
2.54.0


Reply to: