testsuite: use shell arithmetic instead of fork-execing expr
commitd13daddac87692bcc444eecd502539035153848c
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Sun, 28 May 2017 15:02:37 +0000 (28 17:02 +0200)
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Sun, 28 May 2017 19:10:26 +0000 (28 21:10 +0200)
tree18ebcb4f4adacd4d8281e361b1cd345202951572
parentcc80cf751ee229520283e15d24f40b6605cc40c5
testsuite: use shell arithmetic instead of fork-execing expr

The tessuite use a few counters to keep track of things.
These counters are incremented via the 'expr' command.

But this command is not a shell builtin and need thus
to be fork+execed which need more CPU ressources than
using some builtin operation.

Change this by doing all the arithmetic via the portable
'$(( ... ))' shell builtin.

This speedup the testsuite by another 10%.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
validation/test-suite