[PATCH V4 03/15] selftests/resctrl: Fix memory overflow due to unhandled wraparound