There was an error while loading. Please reload this page.
1 parent e08063a commit 9a7a4bdCopy full SHA for 9a7a4bd
1 file changed
src/run/runner/wall_time/perf/mod.rs
@@ -156,6 +156,19 @@ impl PerfRunner {
156
// Get the perf data file path from the stored tempfile
157
let perf_data_file_path = self.perf_file.path();
158
159
+ // Ensure we have the permissions to write to the tempfile when running with sudo
160
+ run_with_sudo(
161
+ "chown",
162
+ [
163
+ &format!(
164
+ "{}:{}",
165
+ nix::unistd::Uid::current(),
166
+ nix::unistd::Gid::current()
167
+ ),
168
+ &perf_data_file_path.to_string_lossy().to_string(),
169
+ ],
170
+ )?;
171
+
172
let raw_command = format!(
173
"set -o pipefail && {} | cat > {}",
174
&cmd_builder.as_command_line(),
0 commit comments