summaryrefslogtreecommitdiffhomepage
path: root/test/util/cgroup_util.cc
diff options
context:
space:
mode:
authorRahat Mahmood <rahat@google.com>2021-10-19 15:36:02 -0700
committergVisor bot <gvisor-bot@google.com>2021-10-19 15:38:55 -0700
commit80d655d842755c93d7d6bf0288732cd5d3552c50 (patch)
tree3282e5640eca67e7dea964e6629cdfec7c1e83c0 /test/util/cgroup_util.cc
parent83840125e0bd050129fc3c8983a5bcef7afefe4e (diff)
Stub cpuset cgroup control files.
PiperOrigin-RevId: 404382475
Diffstat (limited to 'test/util/cgroup_util.cc')
-rw-r--r--test/util/cgroup_util.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/util/cgroup_util.cc b/test/util/cgroup_util.cc
index df3c57b87..0308c2153 100644
--- a/test/util/cgroup_util.cc
+++ b/test/util/cgroup_util.cc
@@ -69,6 +69,9 @@ PosixError Cgroup::WriteControlFile(absl::string_view name,
const std::string& value) const {
ASSIGN_OR_RETURN_ERRNO(FileDescriptor fd, Open(Relpath(name), O_WRONLY));
RETURN_ERROR_IF_SYSCALL_FAIL(WriteFd(fd.get(), value.c_str(), value.size()));
+ const std::string alias_path = absl::StrFormat("[cg#%d]/%s", id_, name);
+ std::cerr << absl::StreamFormat("echo '%s' > %s", value, alias_path)
+ << std::endl;
return NoError();
}