From patchwork Mon May 27 12:02:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 799658 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 5032313A3EF for ; Mon, 27 May 2024 12:02:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716811377; cv=none; b=A5PJoBisgurAZtlkllunpYTuL1nMhPWyswqQu68Ru3VdC2KdrDVzM92yrU3pyQ4wK6/iAHIWLxeyPsKpSktyzqKOYGsteWRGI21Aw5jpq0dlL5AsQI9WrH65HgrnRUFFK5OHJgmKjaALH7eqBZBuGn0Fl1pRs1eridg2bYG10cw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716811377; c=relaxed/simple; bh=1GyvaNvfpUaEvNsFHnNWVs/AwwJFUlI35Md9Z/n30BQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=V+CYYVBjFltsHr9DiUGQ/G+mW9mCW78e/S2dVDfFCXKz6V+PFFaj8jzWQBZzI3KpqBpuw2yR+Pao75DYy1phBqrNkLou4A6+A4jzdtBNvcai1LYePSJDRnqM4c/r8BT3kC1Bc+L9mBdYjbGXXjKV00wRdhPDpdZwFcXRd3tmWjM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=vak/C2n2; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="vak/C2n2" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-354f3f6c3b1so4503688f8f.2 for ; Mon, 27 May 2024 05:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1716811373; x=1717416173; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=uKl7FLzd4c1z0RWK+9MURhj1M0dXFZqZSbP25u6zhN0=; b=vak/C2n2IIlzQRDIJ4EMaoNajd89sBl5Ad3DoGXqPlhBC25nNVcoa1FNc+qQ6OmiI0 rtwMpCVANWL38Lrz8VI4WyO7YI4Hn/Rn4OpLaNhtly6KGKmcGK76QQWUzPNr5dyTfsyv aTFQJUTqXSupMXOu7JtLlo5RdEkq+ikUPirFNuyiFf+jp6aCgTtOL6BXfi3BjurymSdk M9ApQgm3OXqTHcybRE4NsoV+ROoIjBu1d3N46UcauOfHD/HCpj4Ucey41vrTUhwFAn1r EXlVRqrW0L1HKcKrHegX6+aTcVzOXwU9WZqdGAqA3vVngv1p43swO/fDqJIzEtVoOM64 6vLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716811373; x=1717416173; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uKl7FLzd4c1z0RWK+9MURhj1M0dXFZqZSbP25u6zhN0=; b=ZWKGe6QuaoClkZTl2+IzPd64RHcAqNTmJ9JxhNxXrKjnrV1qLkf+B1hr5JEu8rZAhQ SPo1sbMw4rZWmpahx02OPVwXOepMDuMuIWnGY9K0V/q+M1NwCLs71J5JTqdNELApABs0 W73XhDW1bUK0/hi4YaCNSjCPay/VLjGhmD1EHpg7NLQoy2tJCfVKzKPDb09d8KzK/5yI zBCyCQvlVL6ayUU7YGfsDi3CHICTG6FrrL1D97Hz+N6JsjZCRq9QnESgx61kq5UKRhxk xubkvR5TEfK8qdQbw9gm5MId3a+FW6PYr5x6yO3ggSNJUE05DeDA9dgbv5eJ+vM4N8I6 WpJg== X-Forwarded-Encrypted: i=1; AJvYcCWJZiXXwxGmUMQtvtHPbrLe5QUNnnhRtvV1LK0Tv+BoNKpiG7PTNoJxUP0iVEaVuBJK8w9e4R8EYpaujCNtz9n8ufdxrjDDQ8GeZQ== X-Gm-Message-State: AOJu0YyHXOuUJRoCuW71QwlpgejAjZYFjX6b1fth7HdcIs/xhNycQ96A IRz73XGXtDC96oWNYe2XdsetnsnSsDSNaQ+SXWWXWTW6HtWMEjNRUzAVNNucejY= X-Google-Smtp-Source: AGHT+IHVxeCXazkPTiFMkTn28dY9tUbFeTthnhR+ht2mXkNfq+37e1sai0C55NOnzAe6iGJLxcKYUQ== X-Received: by 2002:adf:f7c5:0:b0:355:161:b7e6 with SMTP id ffacd0b85a97d-3552f4fffdamr6206698f8f.41.1716811373537; Mon, 27 May 2024 05:02:53 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb1d:75a:e000:c322:131e:ff9d:ef41]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35579d7ed6fsm8948032f8f.9.2024.05.27.05.02.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 05:02:53 -0700 (PDT) From: Bartosz Golaszewski Date: Mon, 27 May 2024 14:02:33 +0200 Subject: [PATCH libgpiod v2 1/4] tools: tests: use tabs for indentation consistently Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240527-fix-bash-tests-v2-1-05d90cea24cd@linaro.org> References: <20240527-fix-bash-tests-v2-0-05d90cea24cd@linaro.org> In-Reply-To: <20240527-fix-bash-tests-v2-0-05d90cea24cd@linaro.org> To: Andy Shevchenko , Kent Gibson , Linus Walleij Cc: Bartosz Golaszewski , linux-gpio@vger.kernel.org X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1105; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=PHUzz9u14ti8fJ8sk3Q5oiYwXdrwukZ94ljgxiqUlwk=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBmVHZperRoi5c2a641dj2uf6ERVp0Kqcw4Ljpaf nYL3rE8V/iJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZlR2aQAKCRARpy6gFHHX cm+sEACsyiISUolsa2hRm0XADbRQf1308bD0j4eBFrSyDY19HeO/F6DfuDDEdLowXTkLK6y07Lj 65q80+8pqe3y04GseHVJnBR7CkKZ/HqtQ5eyZ6HiHbPkFOuWpUSllo0EJyrO0ycgSFJR0rbhUT1 UpYimoaDadfLuJhno39KgeDwsrdBcC6Vef7/ppHUfXDlEttZDmBrJo1LySE5pms4pYLodjdWrh3 HbaLjT9kalOfaKp8Pwf0PpRAThNzOL/VbrM9pjvZ9MOLMF5WX532/gGHEsNkti8Tk4s8YpHvIyE PNRpftXCDh1zkTDsWRmw2YkBUf93V6FnDFPwWUXXHpStAvyQo8jVl2VNBwr3Pz9BWWHS+tpJd2O fKi1Nx5NTCI0+lgb7L9OFw6S+gIH892KUYoMxO38I4gXyDJZIYkyDP433ykZou59mua317TEmX8 lzDy96E2lQRE6E8BeuxLWqFxshaelnB+itVMUF5eD2LnDB1G4bp9su5BfsHTtZRpV6GWsx78y8P 7vHQhCDaEV4eKnEG7EW8LCLPVi+fKMmCKYOc3KcbUNMCDbm5ifxkmyOvSXOo+DQQX3Jp8J8RPGR XosA9Mp9ZgbtCePePjvdE+YrayHuDRf/BsTq/t9aNv36Sw3h8TQv55r8NGf8gyDSVaUx6nH66Bg N11q0l81jW8QMzg== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski Replace all spaces used for indentation with tabs. Suggested-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski --- tools/gpio-tools-test.bash | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/gpio-tools-test.bash b/tools/gpio-tools-test.bash index b55c5eb..abb2f5d 100755 --- a/tools/gpio-tools-test.bash +++ b/tools/gpio-tools-test.bash @@ -203,9 +203,9 @@ dut_run_redirect() { dut_read_redirect() { output=$(<$SHUNIT_TMPDIR/$DUT_OUTPUT) - local ORIG_IFS="$IFS" - IFS=$'\n' lines=($output) - IFS="$ORIG_IFS" + local ORIG_IFS="$IFS" + IFS=$'\n' lines=($output) + IFS="$ORIG_IFS" } dut_read() { @@ -269,12 +269,12 @@ dut_wait() { } dut_cleanup() { - if [ -n "$DUT_PID" ] - then + if [ -n "$DUT_PID" ] + then kill -SIGTERM $DUT_PID 2> /dev/null wait $DUT_PID || false - fi - rm -f $SHUNIT_TMPDIR/$DUT_OUTPUT + fi + rm -f $SHUNIT_TMPDIR/$DUT_OUTPUT } tearDown() { From patchwork Mon May 27 12:02:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 799657 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 0ABAF134B6 for ; Mon, 27 May 2024 12:02:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716811378; cv=none; b=goNUgVi9e9m7epbnqK+EWnQGkrAh1UyOC1XdElhgCXuGk20fTJ81OtxNHh2XeyeH5qFIn3cvRuZEoU+B9WFuBoE0MkMzio1puRTbwHCUtpnWKchZ1VR+gGuAfWvswiizUkRBnz4RbhGSdViQl630da97S7J39oizPVu47tx6Dwk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716811378; c=relaxed/simple; bh=FijMRDM/XyP059GR6OzQNzzyy6nxhX2Xd+8HJ4mYETA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ID35CPpuUEq5BQj0i74Z9OH9E1rLmdT+tGAlQOU/ylL6U4O8DwnZZVvwiZxjNwDN9n+bBzp2v2P2ipf4He389MDrAx1nvTGUDqHmAFSyqDxDsVtvVvX+6qx0JbtC9pV74zOoXT7H3QcAEwee9wpdmGmOlR+oLqH6eyJxKadWg1E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=zGoYKp+L; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="zGoYKp+L" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-420180b58c5so45693285e9.3 for ; Mon, 27 May 2024 05:02:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1716811375; x=1717416175; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=9ua7vWOKcUT4Nb5CxnQL2fw9+0aBnMS++besB1T9WJA=; b=zGoYKp+LfOs/9YC2dAbQVufZE0N9ABAY5U0YNR9wmvJqW5/RyPNod209r6ADF/t2pO UelaPZ3Kh3PrLL72dEq7Es5lFsax8SlylyX6bvjufvBvj/Ye+6k/1pc9TfLYF+ATn8Oq OCvnjd5hNtkW7QwXHmD07HwnXA+9sIPhJl9SqkEY+qwGuQN2qTyHGXIOn8SBoDBtM9Zp 8YGBZJHRIUiG8SPhh70sAl53U8SqPHpgOXTuFc12PXRPg0PBYwWnDxz/ppckH73iaR78 bWeYAR/wo2ExlDJy3Hj08f/PQSELvGFsmtERlUoc6zvj/ZTJDRLH3qxm1Fs6er9QLt+H zHxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716811375; x=1717416175; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9ua7vWOKcUT4Nb5CxnQL2fw9+0aBnMS++besB1T9WJA=; b=MwJa+00thJ0mtPjWt99/1JFCjVBKaOLRhOmlTN0Pjp8sdKcGs782Ym1uOIERlKKrot ZNB9pqVDZC/nrwfMqa9JHbn+JChl0Ec6f84208umoo4WQgYze9KUWWemN1ptdAbD2muK ryb6iBkUjubRz7Y76JyHsmZjmJlQG0KQU7zeXc3X7sPgcVYl5xxnHhrj4kBovttVzSw7 LiMZucW286khSfADtVXFckp6ZhPZxdKlf7ant7f+AfYX3t/d4wFnvJU/QGnat8nwzMLS J9qpoqldY5pYLJhNOA+JKUUlE+mDfgOzjTfvcqhhxnj+n8WH+S5wtABAQlj2nj5xwm9M jzbA== X-Forwarded-Encrypted: i=1; AJvYcCX4R7uYyduUjYhf69PoDe8VtaLveL4tU9iekZwZ40fRoSIdTcjl3TIyzM6Vxy90DnblVEzYQSNzOw6h5/JfObmilD4myEalkJGdGg== X-Gm-Message-State: AOJu0YzyI+3EN8o6xDfUFzFgb8H6qxIwOk8pts4UsImlNeSexZA/NArc 6CG1JlnjTNGt2TrKxbWpL5s5yM9OiLWl7x6bnGo55VAH8gJgcXeTcdAOYuM+BhY= X-Google-Smtp-Source: AGHT+IFbguwBGtZzqDbJv0a093iGtZNT+U0Uri8p1O+4sTmj2SSy71jI1isSdRExCiMYyKOSol0Atg== X-Received: by 2002:a05:6000:ca:b0:354:fbc8:1d90 with SMTP id ffacd0b85a97d-3552fdf2099mr6543948f8f.43.1716811375309; Mon, 27 May 2024 05:02:55 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb1d:75a:e000:c322:131e:ff9d:ef41]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35579d7ed6fsm8948032f8f.9.2024.05.27.05.02.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 05:02:54 -0700 (PDT) From: Bartosz Golaszewski Date: Mon, 27 May 2024 14:02:35 +0200 Subject: [PATCH libgpiod v2 3/4] tools: tests: remove unneeded ';' in while loops Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240527-fix-bash-tests-v2-3-05d90cea24cd@linaro.org> References: <20240527-fix-bash-tests-v2-0-05d90cea24cd@linaro.org> In-Reply-To: <20240527-fix-bash-tests-v2-0-05d90cea24cd@linaro.org> To: Andy Shevchenko , Kent Gibson , Linus Walleij Cc: Bartosz Golaszewski , linux-gpio@vger.kernel.org X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=952; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=MWkXjJEine5SFoKsyBlWbiJ/NykGrVEZdDeBJ/QInu8=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBmVHZqKYsnreOXRNDyjPxwtwQbykcZGkGwMZIzK GjzgKV0ATKJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZlR2agAKCRARpy6gFHHX cnWGEACHkO0r10appRbhw9S12OARuhWd/C9OAQyRpJHb1AgeibVuVozHLPAKUBtUPzwUT8mTB6U B7Woo4H4RRKy0dmg2Rjwp4iMsPDSPcq+teaB3zq96kLGESZbjMqVthMIAo2y8u+IVJ/QzSqY8A3 mXRJIUeQpZtE4b7TSuwX6KrC/+1+LKVIKw2M7Iw61QEgVr6you4hHJYMXo97LOBXrpaeyteP8Fy wTPte0pDzvLJv18rjjDvvIb1ls99NjtWgla8XYgk2PAU1JIdva9euCYptBLM8l51plE4Z/yTL+3 DUP44IgwMdXRdwGaSq8cqxl4By/sXvUYa6NGsO9gn3e/qfa8zVmRFySdwyJAIMzrYcmz2xdVZKa GOFt+5qJ0VjrwmEbr/rZK1pR0BUkOFIH5oQvetHaTg0WV0gzWXYXCRJ95yDJczSUwebuxQ7sgKj zwYrQ0kPzZ0vDJTsssG4unmT5QWeXR31RC9d49YA8of3LBFNqZbqZ7AR3QGTVGGaBPGZYt+0rMg PkwRxkgUl5GN0PBEaVmisQlmswOhqaRdUaWfHZBh1v06TFmWlybgxDJhUitvv6PiWBI6v4oFXeh 9Si2dSEgdqwb/nzQtv9FsgLnnSaqee6+AhNekh8HpNsMSM5pkArQ72UkMxaYG5+9YchPBoGettc kv+s3ij2QYfK6uw== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski We're already breaking the line between while and do so there's no need for the ';' character. Suggested-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski --- tools/gpio-tools-test.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/gpio-tools-test.bash b/tools/gpio-tools-test.bash index dde26b4..ff4dea6 100755 --- a/tools/gpio-tools-test.bash +++ b/tools/gpio-tools-test.bash @@ -211,7 +211,7 @@ dut_read_redirect() { dut_read() { local LINE lines=() - while read -t 0.2 -u ${COPROC[0]} LINE; + while read -t 0.2 -u ${COPROC[0]} LINE do if [ -n "$DUT_FIRST_CHAR" ] then @@ -232,7 +232,7 @@ dut_flush() { lines=() output= unset DUT_FIRST_CHAR - while read -t 0 -u ${COPROC[0]} JUNK; + while read -t 0 -u ${COPROC[0]} JUNK do read -t 0.1 -u ${COPROC[0]} JUNK || true done