Fix GCC build of ptrace_test after 96a9e50e63bfc
It seems like GCC's -Wsign-compare is stricter and also warns for
constants. Appease GCC by adding the required casts.
Fixes: 96a9e50e63bfc ("ptrace_test: Add more debug output on test failures")
Reported by: Jenkins CI
(cherry picked from commit 1fcbddec14dd693acf6a4be579f8d9e10b6a06a4)