[PATCH blktests 10/15] tests/meta/group: Fix shellcheck complaints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Avoid that shellcheck complains about unused global variables.
Avoid that shellcheck complains about using cat instead of
redirection.

Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxx>
---
 tests/meta/group | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/meta/group b/tests/meta/group
index 4281ea175a78..bae91281c493 100644
--- a/tests/meta/group
+++ b/tests/meta/group
@@ -17,6 +17,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+. common/shellcheck
+
 group_requires() {
 	if [[ -v META_REQUIRES_SKIP ]]; then
 		SKIP_REASON="META_REQUIRES_SKIP was set"
@@ -76,7 +78,7 @@ RIP: blk_dev_init+0x4/0x6 RSP: ffffc9000031fe70
 ---[ end trace d9ab35f734a89f58 ]---
 EOF
 
-	cat "$TMPDIR/dmesg" | while IFS= read -r line; do
+	while IFS= read -r line; do
 		echo "$line" >> /dev/kmsg
-	done
+	done < "$TMPDIR/dmesg"
 }
-- 
2.17.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux