From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f97.google.com (mail-ej1-f97.google.com [209.85.218.97]) (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 9871F240604 for ; Fri, 12 Dec 2025 05:17:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.97 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765516628; cv=none; b=KFBAa/0zGm+s4AtcMpGrwu65SRSf/0j4/mDMPdLgMG5/kBln/VU/eG726TAUbTfhV7TCURDUaN/OS/WWbPDGe+B+CUMH/0d9KLNuOdOcD3RwapcyVA4+odVThdEwjd7aiZqquSz2rUwSk3oqe6qG5mykhuJkMVZ2glC2k3TsQIU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765516628; c=relaxed/simple; bh=Nv/iP0PPlu7PYFQwI+jBPI8ffRylYj1zxIf1qEKb0tE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JyJ+5p+N73OTjBmglVZaRP358G6cz3mV/nlGaZBILPOGQB9WqgdWbgwtZhCuYsCnyctD/CdDgilCNkxonN/waOHy+C5m7CU430m+/Oxoq5/fbsgd3H+DRk7UYfOboD5Syu0awY2l08C/oOWDHQmS8Q9vg/D4Cj2UvBfI5iNycNg= 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=MWCugvxG; arc=none smtp.client-ip=209.85.218.97 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="MWCugvxG" Received: by mail-ej1-f97.google.com with SMTP id a640c23a62f3a-b7355774747so13234766b.2 for ; Thu, 11 Dec 2025 21:17:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1765516624; x=1766121424; 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=Ro8OsZF3uJAug4OtKve3tUbRbgxB29DrKAw1agkxt6A=; b=MWCugvxGJ5bcaQvBBCe1EmAUmVNkByLHzjxtweQxeEFnrCecaqahJ9CiRCBIIkuydN MxQHmXwdCOjCuq+uJxdAAtmiPpFWVKJoVYfz3vNCopWvy/E1rEn3UI2F44zdkRQUey3J nZ9YcqhYf5OGls7PC0umB4f9+5BpUb2+HYSUdUdLoZZvMmM47qkm5bq+1Z+uprJKrJfi 1WQHbrNS0cEqie8Sr7+T4xAPt/Roa6MpZdMDM5NlvpNO7fJkMR5LhUmeGkkAHeuTqJ0X jJkAtUum3tKjyG0jD6S8rcBAWZtMMLUjtopMRrYF89udxUR1cHf1bNxNLwvOGy0bFBRm 3t8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765516624; x=1766121424; 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=Ro8OsZF3uJAug4OtKve3tUbRbgxB29DrKAw1agkxt6A=; b=Bg2bnLfi+zBx6pC4N+963HgFujFNjBEIqqG57zDXfNZDT/nym4fn4oWGbYRFWwkOZZ SINR6X99b/9z81PUCP8lygbddD4dnmWWAw/E/Vo9cAK6g5pCYH4HG1dpsh5ynwrBnw1k T8FF/bF0IYqtNi5nUj6Hz9rB9/pj8USnWJBKZAy8lKaHgnCF1nf6QZG68sYnhYiiAnKJ xG5714yDfJ+2YS2GHyeYrph1LkyBbEL7fO4kI54/DQaaUrfoL7W5L/6KuITMWAhQF2k0 fzqPhurS9Mz0pXL3FPRNp17njpkbo4+LCWKxRZI+58AqQS5MNluSJDLYt1MC1vblVerM yPxg== X-Forwarded-Encrypted: i=1; AJvYcCVGbRVCnIrtpxKVU8XC/LZkWVh3EtUqEMv5QAXiEPAQrlKqdJdjgYOfTmQzgAqke0aJ6svwxlU2zCqlO5I=@vger.kernel.org X-Gm-Message-State: AOJu0Yy4A2sDbOtbc38Bj9ZXXqeK4bJ0lXSoEoP2Rn69aWE/Ctw4wGH1 fD17cEU3MsQhKea16PJ1IuaAw8oLRJBWIQ/EDy26vC6fulv/IBnpoE8ZfvY0Huq0g54Jo3gDxLx eH3+z05hgN9Q57jhQgnU25gdGgOwgbqGcfQDH X-Gm-Gg: AY/fxX4vf5VdI/Wq/s3d/3qtCCkXrfH376qvX0iaT9FfW7/iLCmE0DWma9tlYlmCvWg SzKPPv6dmp8eC3zrJOqY39eOLthEDCpqlrkH2foIZZ6vnKf0WP+AG/++lvhcNkGFXEJeLSCyDH9 yDv2ExaO2T4t8zdSmRVVybeLK5Oqx1TNq7r9IXlYFV/HVq3NAziiXEoKmy7jj10hzeME11Dtuh6 CxstO5kQDjaosiSyL+kkXc7bzUiDcUdSmaSfzV0vquGJadezzo6ES5gII9lF/f4PPGKOJdXveE8 F1USfuhCKadr6LB3GrnShasNMKPVkxfRk4PZnUYmZ+GJ7hUe7lmwB8EiXmfLQaWS38MnKORHjgC lbMo2BN+Ro1Dm88g7iTsyOX7YtmyF/MfYgic50nJE0w== X-Google-Smtp-Source: AGHT+IEawf1to/V+/+Qx4OvUJswtkr88PbpqURl0CG0xqAJjTju6BHqC8DK8KJbweq/Q9sRitTwQT4JGUkml X-Received: by 2002:a17:907:60d0:b0:b76:c498:d410 with SMTP id a640c23a62f3a-b7d23aa5780mr34437166b.8.1765516623927; Thu, 11 Dec 2025 21:17:03 -0800 (PST) Received: from c7-smtp-2023.dev.purestorage.com ([208.88.159.129]) by smtp-relay.gmail.com with ESMTPS id a640c23a62f3a-b7cfa609a26sm86779066b.86.2025.12.11.21.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Dec 2025 21:17:03 -0800 (PST) X-Relaying-Domain: purestorage.com Received: from dev-csander.dev.purestorage.com (unknown [IPv6:2620:125:9007:640:ffff::1199]) by c7-smtp-2023.dev.purestorage.com (Postfix) with ESMTP id 9E989340B96; Thu, 11 Dec 2025 22:17:02 -0700 (MST) Received: by dev-csander.dev.purestorage.com (Postfix, from userid 1557716354) id 9B464E41A2E; Thu, 11 Dec 2025 22:17:02 -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 v2 1/8] selftests: ublk: correct last_rw map type in seq_io.bt Date: Thu, 11 Dec 2025 22:16:51 -0700 Message-ID: <20251212051658.1618543-2-csander@purestorage.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20251212051658.1618543-1-csander@purestorage.com> References: <20251212051658.1618543-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 The last_rw map is initialized with a value of 0 but later assigned the value args.sector + args.nr_sector, which has type sector_t = u64. bpftrace complains about the type mismatch between int64 and uint64: trace/seq_io.bt:18:3-59: ERROR: Type mismatch for @last_rw: trying to assign value of type 'uint64' when map already contains a value of type 'int64' @last_rw[$dev, str($2)] = (args.sector + args.nr_sector); Cast the initial value to uint64 so bpftrace will load the program. Signed-off-by: Caleb Sander Mateos Reviewed-by: Ming Lei --- tools/testing/selftests/ublk/trace/seq_io.bt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/ublk/trace/seq_io.bt b/tools/testing/selftests/ublk/trace/seq_io.bt index 272ac54c9d5f..507a3ca05abf 100644 --- a/tools/testing/selftests/ublk/trace/seq_io.bt +++ b/tools/testing/selftests/ublk/trace/seq_io.bt @@ -2,11 +2,11 @@ $1: dev_t $2: RWBS $3: strlen($2) */ BEGIN { - @last_rw[$1, str($2)] = 0; + @last_rw[$1, str($2)] = (uint64)0; } tracepoint:block:block_rq_complete { $dev = $1; if ((int64)args.dev == $1 && !strncmp(args.rwbs, str($2), $3)) { -- 2.45.2