[PATCH v2 12/15] selftests/nolibc: add common get_tmpfile()