See the associated libcgroup patchset that adds support for
the '=' character in the value of a cgset name/value pair.

I ran this test both with the fix in patch 2 (cgset: Fix parsing
of name/values with an '=' in the value) of the aforementioned
patchset and without.  With the fix the test passes, without the
fix the test fails as expected:

        [----------] 1 test from CgsetParseRFlagTest
        [ RUN      ] CgsetParseRFlagTest.EqualCharInValue
        016-cgset_parse_r_flag.cpp:51: Failure
              Expected: name_value.value
              Which is: "\"8:16 wbps"
        To be equal to: VALUE
              Which is: "\"8:16 wbps=1024\""
        [  FAILED  ] CgsetParseRFlagTest.EqualCharInValue (1 ms)
        [----------] 1 test from CgsetParseRFlagTest (1 ms total)

Thanks to github user @santiagorr for reporting this bug.

Code is available here:
https://github.com/drakenclimber/libcgroup/tree/issues/fixcgset

Tests are available here:
https://github.com/drakenclimber/libcgroup-tests/tree/issues/fixcgset

Automated test results are here:
https://github.com/drakenclimber/libcgroup/runs/2239041068

Code coverage increased from 50.2% to 50.4%:
https://coveralls.io/builds/38396930/source?filename=src%2Ftools%2Fcgset.c#L76

Tom Hromatka (1):
  gtest: Add unit test for cgset's parse_r_flag()

 gunit/016-cgset_parse_r_flag.cpp | 52 ++++++++++++++++++++++++++++++++
 gunit/Makefile.am                |  7 +++--
 2 files changed, 57 insertions(+), 2 deletions(-)
 create mode 100644 gunit/016-cgset_parse_r_flag.cpp

-- 
2.26.2



_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to