codership / mysql-wsrep

wsrep API patch for MySQL server
Other
65 stars 34 forks source link

Test for '-k' option fails; FreeBSD timeout(1) prints help to stderr but this is not captured #379

Closed ltning closed 3 years ago

ltning commented 3 years ago

https://github.com/codership/mysql-wsrep/blob/908c06c83db30e34422f147fa29f837fcf1e33cd/scripts/wsrep_sst_xtrabackup-v2.sh#L720

This needs to capture stderr in addition to stdout.

Consider this example:

$ if timeout --help | grep -q -- '-k';then echo 'has -k';fi
Usage: timeout [--signal sig | -s sig] [--preserve-status] [--kill-after time | -k time] [--foreground] <duration> <command> <arg ...>

vs this:

$ if timeout --help 2>&1| grep -q -- '-k';then echo 'has -k';fi
has -k