diff --git a/pkg/power/c_states_test.go b/pkg/power/c_states_test.go index c7d1142..152a310 100644 --- a/pkg/power/c_states_test.go +++ b/pkg/power/c_states_test.go @@ -23,7 +23,7 @@ func setupCoreCStatesTests(cpufiles map[string]map[string]map[string]string) fun for cpu, states := range cpufiles { if cpu == "driver" { - os.MkdirAll(filepath.Join(basePath, strings.Split(cStatesDrvPath, "/")[0]), 0644) + os.MkdirAll(filepath.Join(basePath, strings.Split(cStatesDrvPath, "/")[0]), os.ModePerm) for driver := range states { os.WriteFile(filepath.Join(basePath, cStatesDrvPath), []byte(driver), 0644) break @@ -31,9 +31,9 @@ func setupCoreCStatesTests(cpufiles map[string]map[string]map[string]string) fun continue } cpuStatesDir := filepath.Join(basePath, cpu, cStatesDir) - os.MkdirAll(filepath.Join(cpuStatesDir), 0644) + os.MkdirAll(filepath.Join(cpuStatesDir), os.ModePerm) for state, props := range states { - os.Mkdir(filepath.Join(cpuStatesDir, state), 0644) + os.Mkdir(filepath.Join(cpuStatesDir, state), os.ModePerm) for propFile, value := range props { os.WriteFile(filepath.Join(cpuStatesDir, state, propFile), []byte(value), 0644) } diff --git a/pkg/power/core_test.go b/pkg/power/core_test.go index 5a37c11..ae579b8 100644 --- a/pkg/power/core_test.go +++ b/pkg/power/core_test.go @@ -74,7 +74,7 @@ func setupCoreTests(cpufiles map[string]map[string]string) func() { for cpuName, cpuDetails := range cpufiles { cpudir := filepath.Join(basePath, cpuName) - os.MkdirAll(filepath.Join(cpudir, "cpufreq"), 0644) + os.MkdirAll(filepath.Join(cpudir, "cpufreq"), os.ModePerm) os.WriteFile(filepath.Join(cpudir, scalingDrvFile), []byte("intel_pstate\n"), 0664) for prop, value := range cpuDetails { switch prop {