mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
Transition to Rust 2018
Signed-off-by: Levente Kurusa <lkurusa@acm.org>
This commit is contained in:
+7
-7
@@ -12,7 +12,7 @@ use cgroups::cgroup_builder::*;
|
||||
|
||||
#[test]
|
||||
pub fn test_cpu_res_build() {
|
||||
let v1 = ::hierarchies::V1::new();
|
||||
let v1 = crate::hierarchies::V1::new();
|
||||
let cg: Cgroup = CgroupBuilder::new("test_cpu_res_build", &v1)
|
||||
.cpu()
|
||||
.shares(85)
|
||||
@@ -30,7 +30,7 @@ pub fn test_cpu_res_build() {
|
||||
|
||||
#[test]
|
||||
pub fn test_memory_res_build() {
|
||||
let v1 = ::hierarchies::V1::new();
|
||||
let v1 = crate::hierarchies::V1::new();
|
||||
let cg: Cgroup = CgroupBuilder::new("test_memory_res_build", &v1)
|
||||
.memory()
|
||||
.kernel_memory_limit(128 * 1024 * 1024)
|
||||
@@ -51,7 +51,7 @@ pub fn test_memory_res_build() {
|
||||
|
||||
#[test]
|
||||
pub fn test_pid_res_build() {
|
||||
let v1 = ::hierarchies::V1::new();
|
||||
let v1 = crate::hierarchies::V1::new();
|
||||
let cg: Cgroup = CgroupBuilder::new("test_pid_res_build", &v1)
|
||||
.pid()
|
||||
.maximum_number_of_processes(PidMax::Value(123))
|
||||
@@ -70,7 +70,7 @@ pub fn test_pid_res_build() {
|
||||
#[test]
|
||||
#[ignore] // ignore this test for now, not sure why my kernel doesn't like it
|
||||
pub fn test_devices_res_build() {
|
||||
let v1 = ::hierarchies::V1::new();
|
||||
let v1 = crate::hierarchies::V1::new();
|
||||
let cg: Cgroup = CgroupBuilder::new("test_devices_res_build", &v1)
|
||||
.devices()
|
||||
.device(1, 6, DeviceType::Char, true,
|
||||
@@ -96,7 +96,7 @@ pub fn test_devices_res_build() {
|
||||
|
||||
#[test]
|
||||
pub fn test_network_res_build() {
|
||||
let v1 = ::hierarchies::V1::new();
|
||||
let v1 = crate::hierarchies::V1::new();
|
||||
let cg: Cgroup = CgroupBuilder::new("test_network_res_build", &v1)
|
||||
.network()
|
||||
.class_id(1337)
|
||||
@@ -113,7 +113,7 @@ pub fn test_network_res_build() {
|
||||
|
||||
#[test]
|
||||
pub fn test_hugepages_res_build() {
|
||||
let v1 = ::hierarchies::V1::new();
|
||||
let v1 = crate::hierarchies::V1::new();
|
||||
let cg: Cgroup = CgroupBuilder::new("test_hugepages_res_build", &v1)
|
||||
.hugepages()
|
||||
.limit("2MB".to_string(), 4 * 2 * 1024 * 1024)
|
||||
@@ -130,7 +130,7 @@ pub fn test_hugepages_res_build() {
|
||||
|
||||
#[test]
|
||||
pub fn test_blkio_res_build() {
|
||||
let v1 = ::hierarchies::V1::new();
|
||||
let v1 = crate::hierarchies::V1::new();
|
||||
let cg: Cgroup = CgroupBuilder::new("test_blkio_res_build", &v1)
|
||||
.blkio()
|
||||
.weight(100)
|
||||
|
||||
Reference in New Issue
Block a user