From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3C91C77B73 for ; Mon, 5 Jun 2023 20:03:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229745AbjFEUDn (ORCPT ); Mon, 5 Jun 2023 16:03:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230033AbjFEUDl (ORCPT ); Mon, 5 Jun 2023 16:03:41 -0400 Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 739FE9E for ; Mon, 5 Jun 2023 13:03:38 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id 0ce7da20-03dc-11ee-abf4-005056bdd08f; Mon, 05 Jun 2023 23:03:34 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Mon, 5 Jun 2023 23:03:33 +0300 To: joe.slater@windriver.com Cc: linux-gpio@vger.kernel.org, randy.macleod@windriver.com Subject: Re: [v2][libgpiod][PATCH 1/1] gpio-tools-test.bats: modify delays in toggle test Message-ID: References: <20230605190051.3915571-1-joe.slater@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230605190051.3915571-1-joe.slater@windriver.com> Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Mon, Jun 05, 2023 at 12:00:51PM -0700, joe.slater@windriver.com kirjoitti: > From: Joe Slater > > The test "gpioset: toggle (continuous)" uses fixed delays to test > toggling values. This is not reliable, so we switch to looking > for transitions from one value to another. > > We wait for a transition up to 1.5 seconds. ... > +gpiosim_wait_value() { > + local OFFSET=$2 > + local EXPECTED=$3 > + local DEVNAME=${GPIOSIM_DEV_NAME[$1]} > + local CHIPNAME=${GPIOSIM_CHIP_NAME[$1]} > + local PORT=$GPIOSIM_SYSFS/$DEVNAME/$CHIPNAME/sim_gpio$OFFSET/value > + > + for i in {1..15} ; do Do you need space before semicolon? > + [ "$(<$PORT)" = "$EXPECTED" ] && return > + sleep 0.1 > + done > + return 1 > +} ... > - for LINE in $(find $BANKPATH/ | grep -E "line[0-9]+$") > + for LINE in $(find $BANKPATH/ | egrep "line[0-9]+$") Seems stray change. -- With Best Regards, Andy Shevchenko