From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f227.google.com (mail-qt1-f227.google.com [209.85.160.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 ED7773B5E01 for ; Mon, 3 Aug 2026 21:14:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.227 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785791691; cv=none; b=NLd54cSlGrSvc+SCq0EuM0CWUN/eA9EQrcM4rXQ5EmrnoLeyb98O272+vN30EI134tBMa1zjNRSYHBGiwnnMR4IRIF34jGS+WoBKnXfrJoCTVW/WeQhbj9cTqu8Co9IcKhZ7HUXwkLLw7nebvqkVMJ+tulhP04mYm318iJINcqI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785791691; c=relaxed/simple; bh=8qxekDeSK5x+ec3E67tUMH2DiSjF/BHmj5eXMGM1EUQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=azNsfZ8lgUQ+n1pvBoCvN5c2ExBqWToRpTwaWQJzCMQTZ8w6qmS7j35IhEN3xvV14mjed602o9M3i9Ts3DZOk8pEgR4spOukMN0wFqOOkzbpSycx9Eg280MqSrgINNzzbs9YhZDY8vQkI9Uzz8GIYyJZ5MP4VTL3zPVpzx+8tFU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=purestorage.com; spf=pass smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=DDzxn+MX; arc=none smtp.client-ip=209.85.160.227 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=pass 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="DDzxn+MX" Received: by mail-qt1-f227.google.com with SMTP id d75a77b69052e-52b4e3fd033so1916951cf.0 for ; Mon, 03 Aug 2026 14:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1785791686; x=1786396486; 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:content-type; bh=q/ysi0c3v/nSs3PcCunYETC+T3p7rfWS9Ra9/ntvyBI=; b=DDzxn+MX2lgwWRBkZu6OQhokrvUo1q+qdVG3p2rhBfx8VhGU6gwhBUlqTeQBCoB30B L/tEaknzZ5BQcejafpvsfq1939ABqYP7vtmBBbcuohJfC2b4+rh9IWURJkOJ6UWYnRLw DJxvZxEV55gJTW2/bQ1bvnoOq8yGFpuKfVT7UviH6LcyeZ8kn+Vc4/avg+eU6nvQ5Yyf Ih1Quw9TDgsdQjVEjjcpJNsec0WVBRtdZQVDs4GEQLYqeOxzSK43QDpFaLxwQwCRaNLy pd+aAkvEotoEqbiyJ7caWLZZqm5pQ5+r/6HFpP7/zd913dFy49Sz6wD1sYm5XqmdFoh9 4m1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785791686; x=1786396486; 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:content-type; bh=q/ysi0c3v/nSs3PcCunYETC+T3p7rfWS9Ra9/ntvyBI=; b=d00iQOLGo/BL0Ce67OuA07pznl4riBA8zPtBDjmUXQ6F/E4H7eR4c5k/WmEl3v0wEq UKff/mlf42ZIkdEnpi5zN9Nltk3jTClmRkib4whYdoZRXp/fbgbs2BqaClqRlMSq4/V+ WnliVTHTKwjC7EV0zvLE+vQysQEeREbNlZjBsLT3tLiLKiL7KL8Qx8CksGdN7xDOGdLQ DAK/OXeNlxoujVUnWXnEkOZdDk6HQDw5z7Klr6IiRCtdgxGgGRC9G4nXsmo+9inNULyv ma7qleJl6MGXGoj1eVZESJuMkxek6zCUWxUMLFw0+f1T99MOG5CZsq3TxovAXsGEA3Q7 +29Q== X-Forwarded-Encrypted: i=1; AHgh+RrXvYtthegUSw33KXBDJyyC5oMSicpGBMZqx0pL5/HmR6SgfPsRsoTxCwyhQwqkBeyFvBS9K5F9BP3DKsA=@vger.kernel.org X-Gm-Message-State: AOJu0Ywhms8sPuW+PnvPktLKs3bGm1RRYis+2YJ8YpEyQbaJdy3aEdk2 RFbaUBhsXtOBbujWnSgfvsN3MR+OlFR7YMeRtLWfxHyiGoRLLilQJ1Zr6HpP1wNYfNLInxQHrv2 su/CTZWNXk5K1fgfHxgnh7FB7mSvAxmaF/kOV X-Gm-Gg: AR+sD12iQXFBH7968RS1sOh3+8EBKHkHtpRAxcjRBaBNyJIw4vGAcPyRYrfspe/D0le QeUxPRiqnAMgFvYpza2PzPAjL+jgpLke5xHWDGAcAtKFAFskw3IIvNxsATKME2er35C6JdJdcmL l7LgAthCscuci+NxoUQz2uOw0WgQZFcKqPLsKtN7O8appE1uvXsMXTShIRFeocmkN0U8oGFYnrS rh1GMK11fgg0hAH5v37hyGtdHh1UxB1pQKuo/NOMmVh/eZ3s1ts7NADTX5vtCCq83hxs1xaNzUs GCloKcV2/hJJ7h01KBIhE7/CQ0YI9Iw5RDbd267pPxsqdCN83RSVexZH6Lv3L+pKwKnCdh3CkNe kXWaUW7Qwif3PkXaVFh9cOcCTYpsB3Lmq X-Received: by 2002:ac8:7f55:0:b0:517:6162:daf5 with SMTP id d75a77b69052e-52b5681199dmr174778891cf.3.1785791686336; Mon, 03 Aug 2026 14:14:46 -0700 (PDT) Received: from c7-smtp-2026.dev.purestorage.com ([208.88.159.129]) by smtp-relay.gmail.com with ESMTPS id d75a77b69052e-52b4eb94561sm4853741cf.22.2026.08.03.14.14.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 14:14:46 -0700 (PDT) X-Relaying-Domain: purestorage.com Received: from dev-csander.dev.purestorage.com (dev-csander.dev.purestorage.com [10.112.12.104]) by c7-smtp-2026.dev.purestorage.com (Postfix) with ESMTP id AD42143524; Mon, 3 Aug 2026 15:14:45 -0600 (MDT) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id AB005E4041D; Mon, 3 Aug 2026 15:14:45 -0600 (MDT) From: Caleb Sander Mateos To: Ming Lei , Jens Axboe , Shuah Khan Cc: linux-block@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Caleb Sander Mateos Subject: [PATCH v2 7/8] selftests: ublk: add UBLK_F_IO_DESC_SIZE test Date: Mon, 3 Aug 2026 15:14:39 -0600 Message-ID: <20260803211441.2538144-8-csander@purestorage.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260803211441.2538144-1-csander@purestorage.com> References: <20260803211441.2538144-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: 8bit Add test loop_08, which creates a ublk device with UBLK_F_IO_DESC_SIZE enabled and io_desc_size set to 64. The test issues verified I/O to the device using fio. Signed-off-by: Caleb Sander Mateos --- tools/testing/selftests/ublk/Makefile | 1 + tools/testing/selftests/ublk/test_loop_08.sh | 25 ++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100755 tools/testing/selftests/ublk/test_loop_08.sh diff --git a/tools/testing/selftests/ublk/Makefile b/tools/testing/selftests/ublk/Makefile index 6e4fe8d1fed1..b00ef238a038 100644 --- a/tools/testing/selftests/ublk/Makefile +++ b/tools/testing/selftests/ublk/Makefile @@ -32,10 +32,11 @@ TEST_PROGS += test_loop_02.sh TEST_PROGS += test_loop_03.sh TEST_PROGS += test_loop_04.sh TEST_PROGS += test_loop_05.sh TEST_PROGS += test_loop_06.sh TEST_PROGS += test_loop_07.sh +TEST_PROGS += test_loop_08.sh TEST_PROGS += test_integrity_01.sh TEST_PROGS += test_integrity_02.sh TEST_PROGS += test_integrity_03.sh diff --git a/tools/testing/selftests/ublk/test_loop_08.sh b/tools/testing/selftests/ublk/test_loop_08.sh new file mode 100755 index 000000000000..f7af2587482d --- /dev/null +++ b/tools/testing/selftests/ublk/test_loop_08.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +. "$(cd "$(dirname "$0")" && pwd)"/test_common.sh + +ERR_CODE=0 + +if ! _have_program fio; then + exit "$UBLK_SKIP_CODE" +fi + +_prep_test "loop" "write and verify with io_desc_size" + +_create_backfile 0 256M + +dev_id=$(_add_ublk_dev -t loop --io_desc_size 64 "${UBLK_BACKFILES[0]}") +_check_add_dev $TID $? + +# run fio over the ublk disk +_run_fio_verify_io --filename=/dev/ublkb"${dev_id}" --size=256M +ERR_CODE=$? + +_cleanup_test + +_show_result $TID $ERR_CODE -- 2.54.0