[riot-notifications] [RIOT-OS/RIOT] makefiles: Reject `2>&1 >/dev/null`, and weed out remaining offenders (#16806)

chrysn notifications at github.com
Fri Sep 3 13:33:22 CEST 2021


### Contribution description

Shell redirects in the form of `2>&1 >/dev/null` do not, as one might think, redirect both stdout and err to /dev/null, but put stdout to /dev/null and redirect stderr to the process's standard output.

This adds an automated test for such redirects, and removes two more redirects that were spotted with its help.

### Testing procedure

* CI says Go
* Adding Makefile code with `2>&1 >/dev/null` trips up the static checks.

### Issues/PRs references

This is a follow-up on https://github.com/RIOT-OS/RIOT/pull/16775 with the unproblematic parts of https://github.com/RIOT-OS/RIOT/pull/16776 (the rest )
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/16806

-- Commit Summary --

  * makefiles: Reject `2>&1 > /dev/null`
  * make: Sort >/dev/null and 2>&1 when used with command

-- File Changes --

    M dist/testbed-support/makefile.iotlab.single.inc.mk (4)
    M dist/tools/buildsystem_sanity_check/check.sh (14)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/16806.patch
https://github.com/RIOT-OS/RIOT/pull/16806.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16806
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210903/ce3f3e3d/attachment.htm>


More information about the notifications mailing list