linux/lib/raid6
Masahiro Yamada 8652254e96 lib/raid6/test: fix build on distros whose /bin/sh is not bash
[ Upstream commit 06bd48b6cd ]

You can build a user-space test program for the raid6 library code,
like this:

  $ cd lib/raid6/test
  $ make

The command in $(shell ...) function is evaluated by /bin/sh by default.
(or, you can specify the shell by passing SHELL=<shell> from command line)

Currently '>&/dev/null' is used to sink both stdout and stderr. Because
this code is bash-ism, it only works when /bin/sh is a symbolic link to
bash (this is the case on RHEL etc.)

This does not work on Ubuntu where /bin/sh is a symbolic link to dash.

I see lots of

  /bin/sh: 1: Syntax error: Bad fd number

and

  warning "your version of binutils lacks ... support"

Replace it with portable '>/dev/null 2>&1'.

Fixes: 4f8c55c5ad ("lib/raid6: build proper files on corresponding arch")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-29 16:33:00 +02:00
..
test lib/raid6/test: fix build on distros whose /bin/sh is not bash 2020-04-29 16:33:00 +02:00
.gitignore lib/raid6/altivec: Add vpermxor implementation for raid6 Q syndrome 2018-03-20 16:47:25 +11:00
Makefile lib/raid6: fix unnecessary rebuild of vpermxor*.c 2019-08-01 00:09:49 +09:00
algos.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00
altivec.uc lib/raid6: Build proper raid6test files on powerpc 2018-03-20 16:47:52 +11:00
avx2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00
avx512.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00
int.uc md/raid6 algorithms: xor_syndrome() for generic int 2015-04-22 08:00:42 +10:00
mktables.c raid6/test: fix a compilation warning 2020-02-24 08:36:47 +01:00
mmx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00
neon.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
neon.uc lib/raid6: use vdupq_n_u8 to avoid endianness warnings 2019-02-28 17:44:51 +00:00
recov.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00
recov_avx2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
recov_avx512.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
recov_neon.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
recov_neon_inner.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
recov_s390xc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
recov_ssse3.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
s390vx.uc RAID/s390: remove invalid 'r' inline asm operand modifier 2019-06-11 09:48:25 +02:00
sse1.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00
sse2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00
unroll.awk lib: raid6: fix awk build warnings 2019-12-17 19:56:09 +01:00
vpermxor.uc lib/raid6/altivec: Add vpermxor implementation for raid6 Q syndrome 2018-03-20 16:47:25 +11:00
x86.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 48 2019-05-24 17:27:13 +02:00