Use $(( )) arithmetic expansion instead of `expr something`No need to use an external tool when the shell can handle this basic task.
Do not suppress error messages to stderr, but remove unnecessarydebug prints. This gives better hints why the tests are failing.
Add regression test suite for FFS, from FreeBSD, okay art@ deraadt@