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