'Sets the property value by cgset command
: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 cgset_property(self, prop, value, pwd=None, check=True, checkprop=None):

    if (pwd is None):
        pwd = self.root
    if isinstance(pwd, int):
        pwd = self.cgroups[pwd]
    try:
        cgroup = self.get_cgroup_name(pwd)
        cgset_cmd = ("cgset    -r    %s='%s'    %s" % (prop, value, cgroup))
        utils.run(cgset_cmd, ignore_status=False)
    except error.CmdError as detail:
        raise error.TestFail(('Modify    %s    failed!:\n%s' % (prop, detail)))
    if (check is not False):
        if (check is True):
            check = value
        if (checkprop is None):
            checkprop = prop
        _values = self.get_property(checkprop, self.get_cgroup_index(cgroup))
        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))))
