'Sets the property value
:param prop: property name (file)
:param value: desired value
:param pwd: cgroup directory
:param check: check the value after setup / override checking value
:param checkprop: override prop when checking the value'

def set_property(self, prop, value, pwd=None, check=True, checkprop=None):

    value = str(value)
    if (pwd is None):
        pwd = self.root
    if isinstance(pwd, int):
        pwd = self.cgroups[pwd]
    try:
        open(os.path.join(pwd, prop), 'w').write(value)
    except Exception as inst:
        raise error.TestError(('cg.set_property():    %s' % inst))
    if (check is not False):
        if (check is True):
            check = value
        if (checkprop is None):
            checkprop = prop
        _values = self.get_property(checkprop, pwd)
        check = '    '.join(check.split())
        if (check not in _values):
            raise error.TestError(('cg.set_property():    Setting    failed:    desired    =    %s,    real    values    =    %s' % (repr(check), repr(_values))))
