Skip to content

Commit

Permalink
Fix task status ns_xxxx delim
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrugman committed Aug 2, 2021
1 parent 9013eef commit 120ef98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/parsers/status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ void to_ns_ids_vector(const std::string& value, std::vector<pid_t>& out)
{
try
{
auto tokens = utils::split(value);
static const char DELIM = '\t';

auto tokens = utils::split(value, DELIM);
for (const auto& token : tokens)
{
pid_t id;
Expand Down
8 changes: 4 additions & 4 deletions test/status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ TEST_CASE("Parse status", "[task][status]")
"Gid: 1000\t1000\t1000\t1000",
"FDSize: 256",
"Groups: 4 24 27",
"NStgid: 4481 1",
"NSpid: 4481 1",
"NSpgid: 4481 1",
"NSsid: 4481 1",
"NStgid: 4481\t1",
"NSpid: 4481\t1",
"NSpgid: 4481\t1",
"NSsid: 4481\t1",
"VmPeak: 23848 kB",
"VmSize: 23816 kB",
"VmLck: 0 kB",
Expand Down

0 comments on commit 120ef98

Please sign in to comment.