test/lib: Use talloc in list test