From nobody Sun Dec 14 11:17:15 2025 Received: from mail-pf1-f227.google.com (mail-pf1-f227.google.com [209.85.210.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C760D2D77EA for ; Fri, 12 Dec 2025 17:17:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.227 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765559832; cv=none; b=fcck80bILk4Vg6ffXPY5YQNlQM3Wp7Qj+H/WS9NCKZfh+g+T6oFGbdpwEm5yYtQkBrK/CT/aqdpNQKH066zA39R/DBF74dZtdMz0UWUIbtElC3Vc7OE87akDzJ3gsi+0Z9xx7TBa1fomP0hYzdPcHmKgi2f0GsE+c88FsmUSQlM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765559832; c=relaxed/simple; bh=+cVia0YqFLhrPDWq9CwKaca7IitMDAWFURSGq1uOQdI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qGSlEzeVZ0T3muhizrqHdSUoBcnJ5f183d9FFyyFjLuG+r74ITPl6TZFHJ3jw/7zGW8duhhxomWmv5TtVGY+E9HYJ+f38Kz3WxFYzi4uPmOCVdiSTmAoKX19R8wlodWghl8UqpupIN9pwst5U/r64UdwNr/iLpeaqQ+l8G9ZETg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com; spf=fail smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=B3bH8foP; arc=none smtp.client-ip=209.85.210.227 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=purestorage.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b="B3bH8foP" Received: by mail-pf1-f227.google.com with SMTP id d2e1a72fcca58-7ab689d3fa0so106728b3a.0 for ; Fri, 12 Dec 2025 09:17:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1765559830; x=1766164630; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2NOEIyKTQ4B6JXoSeSWaOQfr++6G02m3bohInlhRqug=; b=B3bH8foPO+ABH5T9yflbvxpzwPNzv9sx0BXlHcMGxjexlzLql/byvG6zMYrwbVo40E bP/g5xEF3EhHeeR6jdU9FLxzmIs0ZjJuUoemdKiE8qaU1+IssDeDY3fNHCp5I4vhabgs 6UCVOC6/Mila12ivRHLmev+9CvDoRFHnImQz7nmpcyWoK6MTyXjhfBi+jNesHcGlP/3W HKjkzQMmFA5/BGjnJ3oU19qbuL+DEOY9EqgO6UFMyDFZi6MfG3fmQ/1Iet2N03AXYZCF XWkB/7596UJYyhZwuCTqTRVu1J9h5kx1G4+S3wVVGglXUkjzUD10NF46+uTfD1sqmp0o o31g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765559830; x=1766164630; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=2NOEIyKTQ4B6JXoSeSWaOQfr++6G02m3bohInlhRqug=; b=rmg54tcASJfZvH+i4DhRn6vQxGebjnC8MwNapRiXks7W0NP6XY7Uyj/25HJnZ3nqun +dzcc4/8fqPzoLOTz2mygkcTLxk3G00sjlpJsQXdUz4tVfMv+EYxkLiGOo9rhGuq6oYj IZNp82wONZzd4pqJ5rk4KWHgrHC5K/LHqH62nL9XlYBBRxNRJ46JoCu13me3V0Oc2FfW TRXuL4kev9BVT1efsgFSg9MH5no9uuEjz+Nw/Yhsmxy+rgM05JbJwUw2lZkPKBcYet3p seydLd4jCa3zcBbPixzkSbI1gRLZX+M4wLKOTjmhZYMaJwKgMfmadjSgC5SbbY9sc54R WyVA== X-Forwarded-Encrypted: i=1; AJvYcCWYed6w+potyC/4AiLitYpozuKXUf0+LB15IsF4zc3rzIJLg6Ilfw2uX4EmRJtbtU/vIyZL7Bx7QuCMXtg=@vger.kernel.org X-Gm-Message-State: AOJu0YyXu0lpvRQgkuJ+q0lvOcj38QZqdZVjHXWsVSO44YRvMwL9UWUy uCjsHZzyCoc9tfKW3m5xuApiJTqEaj+kIvK6gtdzP9t/JkS+ZooNV01QBcRda2SCaHGvpEr4Rm7 eni+w5somjozYYCDktrmDi90f0hK2qT9/yUj4 X-Gm-Gg: AY/fxX5i4JCdSzeJiaFLsovsuTR18AfNDSMmGAc5cWK1KBwf3bF4WOJAmR3hCTNqpHQ xHDbZf/VRMrELBTeeqhzdJlosCxk55r2LtGPN1svGl28/GdOF6hay2D2ViO/b0FVhRJUIGi9YGl NAutCPEn/DeBxscJD8KVevIFvrYVnp034ZJt8Q0MVHobLSn4Ec3V+wn887f8oml+w/uF95xUyA1 R5viqRiD3z6PWCu00YsV5B6NcvXSFKlvMo6Jhl9rxFL1VBPCP2JyTjt5hiCS3gdZ2uOHgakmyRs en4O9gfzNk/JVu6tekGTTTcwZMXBlSdwPqyN1uPTxCpCWsG+Nhrsjl1Zmiis9sjb0/HArmbqOxm 7RCxTUnL9EZK4O7SNDzO35qbL2K2y+VS2b8/ZpPt5QA== X-Google-Smtp-Source: AGHT+IHpDdHBoJHEFtsw5G8Q+oXhxmWs0OnZKWDZwJIWo8p+KqoHWDCCol6UB04IZ7qsvhQ8mmu9137r4gnv X-Received: by 2002:a05:6a00:234c:b0:7a2:855f:f88b with SMTP id d2e1a72fcca58-7f668dc54a6mr2346324b3a.3.1765559830118; Fri, 12 Dec 2025 09:17:10 -0800 (PST) Received: from c7-smtp-2023.dev.purestorage.com ([208.88.159.128]) by smtp-relay.gmail.com with ESMTPS id d2e1a72fcca58-7f4c276f23csm831520b3a.3.2025.12.12.09.17.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Dec 2025 09:17:10 -0800 (PST) X-Relaying-Domain: purestorage.com Received: from dev-csander.dev.purestorage.com (dev-csander.dev.purestorage.com [10.7.70.37]) by c7-smtp-2023.dev.purestorage.com (Postfix) with ESMTP id 8532A3407A6; Fri, 12 Dec 2025 10:17:09 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id 8337FE4232B; Fri, 12 Dec 2025 10:17:09 -0700 (MST) From: Caleb Sander Mateos To: Ming Lei , Shuah Khan Cc: linux-block@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Caleb Sander Mateos Subject: [PATCH v3 4/9] selftests: ublk: fix fio arguments in run_io_and_recover() Date: Fri, 12 Dec 2025 10:17:02 -0700 Message-ID: <20251212171707.1876250-5-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20251212171707.1876250-1-csander@purestorage.com> References: <20251212171707.1876250-1-csander@purestorage.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" run_io_and_recover() invokes fio with --size=3D"${size}", but the variable size doesn't exist. Thus, the argument expands to --size=3D, which causes fio to exit immediately with an error without issuing any I/O. Pass the value for size as the first argument to the function. Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei --- tools/testing/selftests/ublk/test_common.sh | 5 +++-- tools/testing/selftests/ublk/test_generic_04.sh | 2 +- tools/testing/selftests/ublk/test_generic_05.sh | 2 +- tools/testing/selftests/ublk/test_generic_11.sh | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/ublk/test_common.sh b/tools/testing/se= lftests/ublk/test_common.sh index 8a4dbd09feb0..6f1c042de40e 100755 --- a/tools/testing/selftests/ublk/test_common.sh +++ b/tools/testing/selftests/ublk/test_common.sh @@ -331,15 +331,16 @@ run_io_and_kill_daemon() fi } =20 run_io_and_recover() { - local action=3D$1 + local size=3D$1 + local action=3D$2 local state local dev_id =20 - shift 1 + shift 2 dev_id=3D$(_add_ublk_dev "$@") _check_add_dev "$TID" $? =20 fio --name=3Djob1 --filename=3D/dev/ublkb"${dev_id}" --ioengine=3Dlibaio \ --rw=3Drandread --iodepth=3D256 --size=3D"${size}" --numjobs=3D4 \ diff --git a/tools/testing/selftests/ublk/test_generic_04.sh b/tools/testin= g/selftests/ublk/test_generic_04.sh index 8b533217d4a1..baf5b156193d 100755 --- a/tools/testing/selftests/ublk/test_generic_04.sh +++ b/tools/testing/selftests/ublk/test_generic_04.sh @@ -6,11 +6,11 @@ TID=3D"generic_04" ERR_CODE=3D0 =20 ublk_run_recover_test() { - run_io_and_recover "kill_daemon" "$@" + run_io_and_recover 256M "kill_daemon" "$@" ERR_CODE=3D$? if [ ${ERR_CODE} -ne 0 ]; then echo "$TID failure: $*" _show_result $TID $ERR_CODE fi diff --git a/tools/testing/selftests/ublk/test_generic_05.sh b/tools/testin= g/selftests/ublk/test_generic_05.sh index 398e9e2b58e1..7b5083afc02a 100755 --- a/tools/testing/selftests/ublk/test_generic_05.sh +++ b/tools/testing/selftests/ublk/test_generic_05.sh @@ -6,11 +6,11 @@ TID=3D"generic_05" ERR_CODE=3D0 =20 ublk_run_recover_test() { - run_io_and_recover "kill_daemon" "$@" + run_io_and_recover 256M "kill_daemon" "$@" ERR_CODE=3D$? if [ ${ERR_CODE} -ne 0 ]; then echo "$TID failure: $*" _show_result $TID $ERR_CODE fi diff --git a/tools/testing/selftests/ublk/test_generic_11.sh b/tools/testin= g/selftests/ublk/test_generic_11.sh index a00357a5ec6b..d1f973c8c645 100755 --- a/tools/testing/selftests/ublk/test_generic_11.sh +++ b/tools/testing/selftests/ublk/test_generic_11.sh @@ -6,11 +6,11 @@ TID=3D"generic_11" ERR_CODE=3D0 =20 ublk_run_quiesce_recover() { - run_io_and_recover "quiesce_dev" "$@" + run_io_and_recover 256M "quiesce_dev" "$@" ERR_CODE=3D$? if [ ${ERR_CODE} -ne 0 ]; then echo "$TID failure: $*" _show_result $TID $ERR_CODE fi --=20 2.45.2