From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8416342CB0; Thu, 30 Apr 2026 16:51:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777567875; cv=none; b=olLlVWJs0IoyNG6L2iKOaIZaMRCZPDuMzmIcGO22+5yg8h53oDZg/Cx/6rk/VDSNIVgN3D2JKStjx7M0vcFQyDit98OGc9+oVE92vNyGE/hHi/NcG7+6gqxymJMlWmfEmiYDhPtIVd2isirTb3TPPubn5Qp+5PRqmocKks15HU0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777567875; c=relaxed/simple; bh=8heCOqWXg0B0ic/LZEv4/oqrbh10xfSNh9Rzn5gk3LY=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=sRUwZ53HvIEidiqH2CRyiuNq7monFt3hUnUFiq2nJEXO1QrqNKPEOV0Mu5yOAPBdvlJRx66VTDU4qpmt1pBd8Tl9K1zpZqcnW49GI6BK5MjuUe2Q5Fw2inIi1PtANgdS/zDFjF/K2o6XDFQsHX2y+YiNGfKhpaXTiN3oxVkmDpk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.com; spf=pass smtp.mailfrom=fastmail.com; dkim=pass (2048-bit key) header.d=fastmail.com header.i=@fastmail.com header.b=LzryY13Z; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=pZufQiL4; arc=none smtp.client-ip=202.12.124.156 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fastmail.com header.i=@fastmail.com header.b="LzryY13Z"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="pZufQiL4" Received: from phl-compute-09.internal (phl-compute-09.internal [10.202.2.49]) by mailfhigh.stl.internal (Postfix) with ESMTP id B05447A00C0; Thu, 30 Apr 2026 12:51:10 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-09.internal (MEProxy); Thu, 30 Apr 2026 12:51:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1777567870; x=1777654270; bh=mcF810TAYIZ+eGBrJePl+D8wRSaNJ0xNu7eemO+CWV4=; b= LzryY13ZbaKwACj5iiovHrGvOjcXIlxDtKM6S+0dbTMuxVvmCfDiKQTetSKzadRC 1urWtdnniACFynuReBRqB7yRWm/pqEsIDF4YrLOve4DGz9aEPR28hLQnMoiFZs/+ jf82SOYt2oHtmMg+xH13wM2VF/p4YKOw+dM22EVxPLik4jWKWWqUr2ECXQNlhVMT QTzea7gvFZ4h9cDYUoyUV/JDKfYce6/2dy2trv3nJ3AEDp/8LtY0Y7Y44qyMZ0/G wzSy503brYLjiZG/EB/mOdqEQl7eQtMd9PRfTmCimhW63Tr6TlkTwduZhgstinK5 WGOVjLSNrLooBvwOZjOo8g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1777567870; x= 1777654270; bh=mcF810TAYIZ+eGBrJePl+D8wRSaNJ0xNu7eemO+CWV4=; b=p ZufQiL45KBSn0NlbGiKTccHmf7XVfNinF3eoLzOSXxtywiqlelKGFj8d57SCqOie UVrYNB6ImKMbyReNTFQI+IB3nZI/on2w1dyc2XVCvNfdvNNR7eRRXpg3couLJsbJ BJsjMSa8uPCAITB/biYWaynd+hmLY9ZapxEzwzOdpnOGxw/GSx2pwgu7EyShzMVf FpD/2LrGuRwvEHHQyPsaIStE2QlsHmIVW+0CgFOeROqgFmA51kwfrztnCIlVQWFE RRWN+w49Tg7cz8M8YLLVXG75zDShvTWfYe9C5U60a/TnAVUBU8mXGhyoXyKY8x11 HBzMTdewJizjpUezfDN6g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdekjeekhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvvefkjghfufgtgfesthejredtredttdenucfhrhhomhepfdflohhhnhcu ifhrohhvvghsfdcuoehjghhrohhvvghssehfrghsthhmrghilhdrtghomheqnecuggftrf grthhtvghrnhepveduieelvedutddvvddvkeeuvefhieefieelfeekiedtkedutdeiteeu tefhteegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epjhhgrhhovhgvshesfhgrshhtmhgrihhlrdgtohhmpdhnsggprhgtphhtthhopeduhedp mhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepuggvvhdrshhrihhnihhvrghsuhhluh esghhmrghilhdrtghomhdprhgtphhtthhopehjohhhnhesghhrohhvvghsrdhnvghtpdhr tghpthhtohepjhhonhgrthhhrghnrdgtrghmvghrohhnsehhuhgrfigvihdrtghomhdprh gtphhtthhopegrlhhishhonhdrshgthhhofhhivghlugesihhnthgvlhdrtghomhdprhgt phhtthhopegurghvvgdrjhhirghnghesihhnthgvlhdrtghomhdprhgtphhtthhopehvih hshhgrlhdrlhdrvhgvrhhmrgesihhnthgvlhdrtghomhdprhgtphhtthhopehjohhhnhes jhgrghgrlhgrtghtihgtrdgtohhmpdhrtghpthhtohepughjsgifsehkvghrnhgvlhdroh hrghdprhgtphhtthhopehnvhguihhmmheslhhishhtshdrlhhinhhugidruggvvh X-ME-Proxy: Feedback-ID: if7ae487a:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id F1901700065; Thu, 30 Apr 2026 12:51:09 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Thu, 30 Apr 2026 11:50:49 -0500 From: "John Groves" To: "Dave Jiang" , "John Groves" , "John Groves" , "Dan Williams" , "Alison Schofield" Cc: "John Groves" , "Vishal Verma" , "Jonathan Cameron" , "Aravind Ramesh" , "Ajay Joshi" , "venkataravis@micron.com" , "dev.srinivasulu@gmail.com" , "linux-kernel@vger.kernel.org" , "nvdimm@lists.linux.dev" , "linux-cxl@vger.kernel.org" Message-Id: In-Reply-To: <1e7e9b08-1985-4917-a2f2-f0ef78d8b591@intel.com> References: <0100019ddf064477-8322b695-f2d8-481c-9fcd-8b16fc97ad4d-000000@email.amazonses.com> <20260430153413.84181-1-john@jagalactic.com> <0100019ddf06ce8f-c323d9cd-333b-4076-9717-7c80dbed7620-000000@email.amazonses.com> <1e7e9b08-1985-4917-a2f2-f0ef78d8b591@intel.com> Subject: Re: [PATCH V5 2/2] Add test/daxctl-famfs.sh to test famfs mode transitions: Content-Type: text/plain Content-Transfer-Encoding: 7bit On Thu, Apr 30, 2026, at 11:27 AM, Dave Jiang wrote: > > > On 4/30/26 8:34 AM, John Groves wrote: > > From: John Groves > > > > - devdax <-> famfs mode switches > > - Verify famfs -> system-ram is rejected (must go via devdax) > > - Test JSON output shows correct mode > > - Test error handling for invalid modes > > > > Signed-off-by: John Groves > > --- > > test/daxctl-famfs.sh | 253 +++++++++++++++++++++++++++++++++++++++++++ > > test/meson.build | 2 + > > 2 files changed, 255 insertions(+) > > create mode 100755 test/daxctl-famfs.sh > > > > diff --git a/test/daxctl-famfs.sh b/test/daxctl-famfs.sh > > new file mode 100755 > > index 0000000..12fbfef > > --- /dev/null > > +++ b/test/daxctl-famfs.sh > > @@ -0,0 +1,253 @@ > > +#!/bin/bash -Ex > > +# SPDX-License-Identifier: GPL-2.0 > > +# Copyright (C) 2025 Micron Technology, Inc. All rights reserved. > > +# > > +# Test daxctl famfs mode transitions and mode detection > > + > > +rc=77 > > +. $(dirname $0)/common > > + > > +trap 'cleanup $LINENO' ERR > > + > > +daxdev="" > > +original_mode="" > > + > > +cleanup() > > +{ > > + printf "Error at line %d\n" "$1" > > + # Try to restore to original mode if we know it > > + if [[ $daxdev && $original_mode ]]; then > > + "$DAXCTL" reconfigure-device -f -m "$original_mode" "$daxdev" 2>/dev/null || true > > + fi > > + exit $rc > > +} > > + > > +# Check if fsdev_dax module is available > > +check_fsdev_dax() > > +{ > > + if modinfo fsdev_dax &>/dev/null; then > > + return 0 > > + fi > > + if grep -qF "fsdev_dax" "/lib/modules/$(uname -r)/modules.builtin" 2>/dev/null; then > > + return 0 > > + fi > > + printf "fsdev_dax module not available, skipping\n" > > + exit 77 > > +} > > + > > +# Check if kmem module is available (needed for system-ram mode tests) > > +check_kmem() > > +{ > > + if modinfo kmem &>/dev/null; then > > + return 0 > > + fi > > + if grep -qF "kmem" "/lib/modules/$(uname -r)/modules.builtin" 2>/dev/null; then > > + return 0 > > + fi > > + printf "kmem module not available, skipping system-ram tests\n" > > + return 1 > > +} > > + > > +# Find an existing dax device to test with > > +find_daxdev() > > +{ > > + # Look for any available dax device > > + daxdev=$("$DAXCTL" list | jq -er '.[0].chardev // empty' 2>/dev/null) || true > > + > > + if [[ ! $daxdev ]]; then > > + printf "No dax device found, skipping\n" > > + exit 77 > > Can you use 'do_skip' here? > > DJ Yes! Done in 2 places... Thanks, John