testsuite: use shell arithmetic instead of fork-execing expr