From patchwork Mon Apr 3 04:09:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rohit Ner X-Patchwork-Id: 78345 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2051593vqo; Sun, 2 Apr 2023 21:11:29 -0700 (PDT) X-Google-Smtp-Source: AKy350YHcBFujL6E7fmv1ROLm1CRAabFyAXvTVbIAE3xVFXjm7mfR86CyJhakcIYhXrMg1zcTlKP X-Received: by 2002:a17:90b:3ecd:b0:23e:feef:38ef with SMTP id rm13-20020a17090b3ecd00b0023efeef38efmr38114532pjb.41.1680495089425; Sun, 02 Apr 2023 21:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680495089; cv=none; d=google.com; s=arc-20160816; b=vBzizO5S7560IAy6SiZp6UkXbZ9gcxLroaFIWy2Wi7ZbXeCTcrbfTxYRsLryopqNtv 45l/EY/zaDHvMgb/2QHC9NU/Po6SalC1TkETh6gdVik43gpM4UMvnQ8Kysp5FKaYfwKN vMPoT6qXQktCHIoj81de6IXMGksNZUK4LI0bCe9O0JI5DGCoyjlhut3r9pOXH/w9sftj HOSGAa7GJdLcCYk68myjff9Bku1B3xS/Ckm0JstVXB8Y5xW9i7DycymuOQppHhDHFqe9 IU9AN52HJIRiAmBpR45Ylqq1Cw/E+xI4WVZiZQuaZej1hPRI9WvOmB5/Trbv8NNhlI+H XBaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:mime-version :dkim-signature; bh=IvFnphnDJhIRgXZm0virLekdKTOQfW5+pHsWaTGGeTM=; b=euj1iV32rdPjOIowI8WrjJO0fze/zli0S2SPk1t1VWkGL3KFP19pCIaJAjfVHJGCZ6 lP6WJ6r5Oc6Rvv6wo0u1xnzoagHnYrhjQmgngAiimwXx0zxDuT4KWUBJF6ostncAk21y Ri/IXM6MbLzyJPKMfScnYmUwdGbrOQ9LYUxJKZa9NbuYxBJV93vUEZy3T7bPqxuTS/Jy 9OiE7oCbsIYMUU8XviObX+1k4eIrwCd34yUGaUrtfIiX2Iw4UiTeHalX/27gHaRLxZn+ gyHSDT/O6R7ZY4qc1aXB3OR4rI+IO3gVMc87++kzfb5nxElCE1pIcXzUrloAwnWWK8rn zIvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=kUeJ2lwf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b15-20020a63e70f000000b0050beb3fe626si7099427pgi.13.2023.04.02.21.11.09; Sun, 02 Apr 2023 21:11:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=kUeJ2lwf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231305AbjDCEJ2 (ORCPT + 99 others); Mon, 3 Apr 2023 00:09:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230376AbjDCEJ0 (ORCPT ); Mon, 3 Apr 2023 00:09:26 -0400 Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2E1C7AAF for ; Sun, 2 Apr 2023 21:09:24 -0700 (PDT) Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-5463fa0c2bfso197743717b3.1 for ; Sun, 02 Apr 2023 21:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1680494964; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=IvFnphnDJhIRgXZm0virLekdKTOQfW5+pHsWaTGGeTM=; b=kUeJ2lwf7zRBsYvmzFyuhvCEE7VnpCUYH76GnherL1ruTmM1Q+L5tsiaPdC/GPoqsV htWO6WAJiLZ8g8ZFLB8GefKVE3XzbSa6vOy9Z3lcXegrB6UvIFAKz9/wBfd4mrXlfRrB hDN/hdPEgV4KST6mXOybEp8IObsyB6LY92r0a/qXB1ZGp2/9tDNf2DyvFFdS5U+djt23 O8L3WPpxorS17h6DSYn5Itwh2DbSxUWfUYDRF0IAWAZBfMrPKF0ldhBSdk7xmuWk5/IU +z55dONWjivicjeZO+Vu9ijlURBjxHM7awcwYi+c5zKLk2s8LSujyoMdAla/zFmSDweD GI4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680494964; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IvFnphnDJhIRgXZm0virLekdKTOQfW5+pHsWaTGGeTM=; b=PYHxTaE1qR6eVff80LHX1BAS15h6xR2sg/QJIv0bHz2KmA4TFMzbrN1aMgwRIFa7+7 mk4ih4QJ5Bi+B4jNrt9lazKuDRbDlcSlQVEbKk/vevzzJWgURkGC+YnpczefvUQSQpSK d5/AvgtwxbWY+2qJc8KsRlZ3WpSR9cYaRTQOCkU6sxSLG4srOPbBleMYvOV3QBX+TG2Y 41O4LSeHKcH3o6BrKw3NZGmXtWJJY7mODgOAdpic96Mms5VxgQaOq7PBFq7BdCTFVkdC 2Y0ilEiNwhjDjj9THCZDk54Da9bZATEU5yYcRWDNz36Bsrrw+lC+sA/Lc9F0faoqUvf9 VYzg== X-Gm-Message-State: AAQBX9ffXFmfNGEr3RhZ8MF2LD5k0zqzbA+kOo5eJ6WUPbuVeFEEBBFl r0W9hTv2eKMU7OjoIAvyXw8zjitjI4JOETw2p2liOQ== X-Received: by 2002:a81:ac46:0:b0:544:6828:3c09 with SMTP id z6-20020a81ac46000000b0054468283c09mr17689756ywj.0.1680494963814; Sun, 02 Apr 2023 21:09:23 -0700 (PDT) MIME-Version: 1.0 From: Rohit Ner Date: Mon, 3 Apr 2023 09:39:10 +0530 Message-ID: Subject: [PATCH] spi: spi-loopback-test: Add module param for iteration length To: broonie@kernel.org Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Manu Gautam , Joy Chakraborty X-Spam-Status: No, score=-15.7 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762126819001770888?= X-GMAIL-MSGID: =?utf-8?q?1762126819001770888?= SPI test framework is designed to run each test case for a list of lengths. Introduce a module parameter to limit the iterations to a single value among the list of lengths. Signed-off-by: Rohit Ner module_param(run_only_test, int, 0); @@ -1033,6 +1039,8 @@ int spi_test_run_test(struct spi_device *spi, const struct spi_test *test, for (idx_len = 0; idx_len < SPI_TEST_MAX_ITERATE && (len = test->iterate_len[idx_len]) != -1; idx_len++) { + if ((run_only_iter_len > -1) && len != run_only_iter_len) + continue; FOR_EACH_ALIGNMENT(tx_align) { FOR_EACH_ALIGNMENT(rx_align) { /* and run the iteration */ diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c index 313106eb8d40..675a73cf1579 100644 --- a/drivers/spi/spi-loopback-test.c +++ b/drivers/spi/spi-loopback-test.c @@ -53,6 +53,12 @@ module_param(no_cs, int, 0); MODULE_PARM_DESC(no_cs, "if set Chip Select (CS) will not be used"); +/* run tests only for a specific length */ +static int run_only_iter_len = -1; +module_param(run_only_iter_len, int, 0); +MODULE_PARM_DESC(run_only_iter_len, + "only run tests for a length of this number in iterate_len list"); + /* run only a specific test */ static int run_only_test = -1;