From patchwork Thu Dec 2 14:38:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Siemsen X-Patchwork-Id: 519750 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp766037imb; Thu, 2 Dec 2021 06:40:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyM5iaTUaAJKeqV3K+LFH1fHng55F6Dl4nnaYjAmv/U3iHjqf4H6FQmoGQHSUJtgByTvSrL X-Received: by 2002:a05:6a00:140d:b0:4a9:5e10:60c2 with SMTP id l13-20020a056a00140d00b004a95e1060c2mr7701289pfu.4.1638456005886; Thu, 02 Dec 2021 06:40:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638456005; cv=none; d=google.com; s=arc-20160816; b=QPpOd2vh9AKVkGOd+tHPVTZ+Dl12uJ2MwUItzKbLGs2g2h6FvIUiW2AefVLWjtjqbt r5XtoiXY8G42EN6ZxSuMQZH71godKMlndk/3GSmj/4Tpi2Iu+0AWwmOZCRGqytSLTjzX r9qssDev9wGM/LK923KCo2cB/5WOK6Vf1qKInf4hJ/6thBZJ5ONwFYw201yh9AHEy1P1 Qbw381aSdHY6MLZuH1uSgJApoV+ZRweORLNpzBbYCgA+b533+kOS5PXcXdNt6LQX1vz9 mL2sNRpofPuXNwXalwEt1ZN7rVvffHLw30GK1W3gLt1d/dcrbLFORa8rq9b6WzED2WW2 24Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dkim-signature; bh=4axa3hlTavUdn1vnmKY5mTqt1fRODIhWVR/srKQ8iOA=; b=FKtlLNj8j13tFLqL1fTkjwCCPncf9RivrzgEpP23n5txStLhoYJGEZ+xMJn+d1gUv+ +It4wTy3mc7+uye2pJr6kQQEfH+OWG3qUSl9geL8ccuuwjgdNfYmJdYIF0J/32Lks2s2 j8JLWlEq+0exC/5wN1xlOe/YBcNtnveP9biYVz+XCEbdyZiAI83TKmEYPTR/lqgNpkQ7 +NEW29icEBVn+hat9xJpQg3fHy9i1UcNdM6AqxSyyKhbPiRYAjcbElLQz1J1GC2EBatJ WcPCzwJxnAAl7vtEax/1Lvaj4YxBRHSWvGMOc5Ij2vbuLqQObF4yN34X9sBZ1T/kEVpQ DWaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=SzBFuW2U; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CjSOGOIR; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id d8si4073943pgt.832.2021.12.02.06.40.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 06:40:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=SzBFuW2U; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CjSOGOIR; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=4axa3hlTavUdn1vnmKY5mTqt1fRODIhWVR/srKQ8iOA=; b=SzBFuW2Uh+wXht j/78Cxy47BCxIzFhMsW1AVv7Da3oJZUveEOyphI5X+2xhND6KWOFWyAOdkXaP4Oggpbbm9DF5Olav JWczCZ3HLJ6ptrtBvTC5nNL2RDq8R2rBMj98gl0MYJWZ74XXfeoiqGnA61GAB7XECyi/iqiYRINuB QaxbKUJKKdyp+3s7cRui48VnONmmDOAcm03gwbLVci/vvt72dMYYZn+N7CyTDDcopY5Sh2dDy3sTg gQEa+NIA0k0AjwypXup2CYddQgTZaAVT5/jBQzMGtzuSIMn/G0JctHipPd46jqb2aLcJ7ASlFDJgJ x2xP7bN9vV/le4wYCHdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msnEr-00Cajf-Qj; Thu, 02 Dec 2021 14:39:09 +0000 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1msnEk-00CahK-KD for linux-mtd@lists.infradead.org; Thu, 02 Dec 2021 14:39:04 +0000 Received: by mail-qk1-x72b.google.com with SMTP id t83so47862qke.8 for ; Thu, 02 Dec 2021 06:39:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BtkiMIAT+RslrOrn1Xp5gWgVRtyOFW6KruoQ9Exypno=; b=CjSOGOIR3Szio3DUD/Qf/j8g0M98siSHKBQriLZOkxa9/iiy6WmS90myb7cJmtjjB9 0VJ3Z/7404jmVSagmxzhBJjqC4Rgz76GnF6As1TmAVhy/rnoJkyYXrnKLX8/NZlIunxQ 0RzOMPZteO6kIUeIKFpVGwiHU8fYFblfGB6fwXNTavV8PTrbb/e3JeRpcbG7hYAT5CqW 3dtr1WFFKtd8C33xebkB6sCr+OcVY/V+MtSFc+37E9XV79aa2ydviuwhzYqeiltR0XMJ 5gme+E+BcPXv61XD1Y6XFeuRJGFGaWSLDusT1WherBy6dbL32mXfPumCC7gC667O3mtb IRsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BtkiMIAT+RslrOrn1Xp5gWgVRtyOFW6KruoQ9Exypno=; b=D1leTvSUJHK5cvpQdeQuVAlppfzd1y2QGja455Xn2Y72DBO4AB1k+L71DO96CI5u8e 4MSrsJvirlZNVwXQsZHLU0BZTP93mBftEjOTF2N+3KxkDAcwj6hKg9KNcb/G7EXuep8p ypxXLxH3OZ/rMQXMTeMPUOE468+2EhqeoefYgh6Anhz5rRNj4EonIUJe8pVRkOrb20gH 7ImiLC3DAfQedFQ0TcqVR+z8UtTDYPI+qTRuLEbjjKzYrXuTSdRknFDfgG7cYEwBuk/0 2w3wMxo1N6CR7+qPp7gfK+aHr22kmuu2uX9DCvfsvAnjusskVnKzB+pdqXZVTc/AkNWR A3sw== X-Gm-Message-State: AOAM531jgaJ4bSqhPNMb1dhmelN3BpI0f63FSQkO0vmmFhbLukF9M02d ZTm3aE7Ov9CNIloHivpAV3FIXg== X-Received: by 2002:a05:620a:d96:: with SMTP id q22mr12618702qkl.219.1638455941162; Thu, 02 Dec 2021 06:39:01 -0800 (PST) Received: from maple.netwinder.org (rfs.netwinder.org. [206.248.184.2]) by smtp.gmail.com with ESMTPSA id y21sm1790970qtw.10.2021.12.02.06.39.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 06:39:00 -0800 (PST) From: Ralph Siemsen To: david.oberhollenzer@sigma-star.at, miquel.raynal@bootlin.com Cc: linux-mtd@lists.infradead.org, Ralph Siemsen Subject: [PATCH] mtd-tests: use pages during readtest and stress Date: Thu, 2 Dec 2021 09:38:52 -0500 Message-Id: <20211202143852.3132942-1-ralph.siemsen@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211202_063902_696487_400C67ED X-CRM114-Status: GOOD ( 10.75 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Same fix as a2c6bbc ("mtd-tests: Read and write pages during speed tests") but applied to flash_readtest and flash_stress. Resolves failure of flash_readtest when subpages are present. The test reads a (sub)page followed by the entire OOB. Upon reaching the 2nd subpage, the OOB read fails because it is beyond the end of O [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:72b listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org Same fix as a2c6bbc ("mtd-tests: Read and write pages during speed tests") but applied to flash_readtest and flash_stress. Resolves failure of flash_readtest when subpages are present. The test reads a (sub)page followed by the entire OOB. Upon reaching the 2nd subpage, the OOB read fails because it is beyond the end of OOB. Signed-off-by: Ralph Siemsen --- tests/mtd-tests/flash_readtest.c | 2 +- tests/mtd-tests/flash_stress.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/mtd-tests/flash_readtest.c b/tests/mtd-tests/flash_readtest.c index c5fabc9..b4f4e10 100644 --- a/tests/mtd-tests/flash_readtest.c +++ b/tests/mtd-tests/flash_readtest.c @@ -227,7 +227,7 @@ int main(int argc, char **argv) puts("not NAND flash, assume page size is 512 bytes."); pgsize = 512; } else { - pgsize = mtd.subpage_size; + pgsize = mtd.min_io_size; } pgcnt = mtd.eb_size / pgsize; diff --git a/tests/mtd-tests/flash_stress.c b/tests/mtd-tests/flash_stress.c index 249d8cb..b7a0fec 100644 --- a/tests/mtd-tests/flash_stress.c +++ b/tests/mtd-tests/flash_stress.c @@ -242,7 +242,7 @@ int main(int argc, char **argv) puts("not NAND flash, assume page size is 512 bytes."); pgsize = 512; } else { - pgsize = mtd.subpage_size; + pgsize = mtd.min_io_size; } pgcnt = mtd.eb_size / pgsize;