Skip to content

Commit d0bc722

Browse files
marc-hblgirdwood
authored andcommitted
test/tplg-build.sh: remove spurious xargs -n1 option
The xargs option `-I/--replace` hardcodes max lines `-L 1`. In other words, it always splits the input line by line and ignores whitespace delimiters inside each line. Initial xargs commit d0f4aba ("topology: speed up topology build") used `--replace` after `-n/--max-args=1` which was silently ignored by xargs version 4.7.0. Now xargs 4.8.0 prints the following warning: xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value Remove the ignored `-n 1` to remove the warning. I compared the outputs before and after this commit and they're exactly the same. There's an extra twist. The same xargs command also uses the `-d/--delimiter=,` option which makes xargs ignore newlines and "translates" any max-line `-L` option to `--max-args`; including the `-L 1` max implied by `--replace`. This twist does not make a difference: any max-line or max-args is always overridden by `--replace` whether `--delimiter` is used or not. Of course this entire xargs script is re-inventing (C)Make/ninja that provide build parallelism for free and much more... I digress. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent 5b3186f commit d0bc722

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/test/topology/tplg-build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,11 @@ then
311311
$shell_name
312312

313313
#execute alsatplg to create topology binary
314+
# $TEST_STRINGS is a very long line of comma-delimited filenames.
314315
printf '%s generating %s/*.tplg files with alsatplg...\n' \
315316
"$0" "$BUILD_OUTPUT"
316317
TEST_STRINGS=${TEST_STRINGS%?}
317318
echo $TEST_STRINGS | tr '\n' ',' |
318-
xargs ${VERBOSE:+-t} -d ',' -P${NO_PROCESSORS} -n1 -I string \
319+
xargs ${VERBOSE:+-t} -d ',' -P${NO_PROCESSORS} -I string \
319320
alsatplg ${VERBOSE:+-v 1} -c string".conf" -o string".tplg"
320321
fi

0 commit comments

Comments
 (0)