]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
gunit: Update test 009 to better test dirty flag
authorTom Hromatka <tom.hromatka@oracle.com>
Tue, 23 Feb 2021 20:55:40 +0000 (13:55 -0700)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 25 Feb 2021 15:05:18 +0000 (08:05 -0700)
commit2c605af006f54a03b6d7f4aa6d144693eba5de63
tree9daab94d7b1aa436208ea4f242f705edfeb30e13
parentc1578cb9bf57b57e5fb94d69a2bb0c93bbee6f29
gunit: Update test 009 to better test dirty flag

When the dirty flag is set, cgroup_set_values_recursive()
was erroneously failing the recursive setting of values.
There were two problems in the unit test that caused this to
be missed:
    1. The dirty flag wasn't being set
    2. If fgets() returned a NULL ptr, the contents of the
       settings file weren't being checked

Reported-by: Bharani viswas <bharani.viswas@gmail.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
gunit/009-cgroup_set_values_recursive.cpp