[PATCH v4 1/2] selftest/vm: Add util.h and and move helper functions there