[PATCH V2 03/13] selftests/resctrl: Fix memory overflow due to unhandled wraparound