[PATCH v4 06/29] selftests/resctrl: Refactor fill_buf functions