[PATCH 6.6 157/676] selftests/resctrl: Fix memory overflow due to unhandled wraparound