Skip to content
Commit 06bd48b6 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

lib/raid6/test: fix build on distros whose /bin/sh is not bash



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: 4f8c55c5 ("lib/raid6: build proper files on corresponding arch")
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Acked-by: default avatarH. Peter Anvin (Intel) <hpa@zytor.com>
Reviewed-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Acked-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
parent 7d538b5a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment