Commit 37f2077a authored by aumgn's avatar aumgn
Browse files

[exp script] Fix issue with root rights

parent 689c4a05
...@@ -4,7 +4,7 @@ set -e ...@@ -4,7 +4,7 @@ set -e
export TMPFS_PATH=$BENCH_PATH/tmpfs export TMPFS_PATH=$BENCH_PATH/tmpfs
export PERF_BASE_PREFIX="perf record -a -c 1 -e sched:sched_thread_placement" export PERF_BASE_PREFIX="perf record -a -c 1 -e sched:sched_thread_placement,sched:sched_switch,sched:sched_load_update"
export PINTHREADS_PATH=$HOME/bench/tools/PinThreads export PINTHREADS_PATH=$HOME/bench/tools/PinThreads
export PINTHREADS_BIN=$PINTHREADS_PATH/pinthreads export PINTHREADS_BIN=$PINTHREADS_PATH/pinthreads
...@@ -226,10 +226,10 @@ run_iterations() { ...@@ -226,10 +226,10 @@ run_iterations() {
local cmd_prefix="$perf_prefix $time_prefix $pin_prefix" local cmd_prefix="$perf_prefix $time_prefix $pin_prefix"
local cmd="$(command_$program "$cmd_prefix" "$threads")" local cmd="$(command_$program "$cmd_prefix" "$threads")"
echo "#### $cmd" >$iteration_dir/command echo "#### sudo $cmd" >$iteration_dir/command
cat /proc/schedstat >$iteration_dir/schedstat.before cat /proc/schedstat >$iteration_dir/schedstat.before
eval "$cmd" 1>>$output 2>>$errors eval "sudo $cmd" 1>>$output 2>>$errors
echo "$?" >$iteration_dir/exit_status echo "$?" >$iteration_dir/exit_status
cat /proc/schedstat >$iteration_dir/schedstat.after cat /proc/schedstat >$iteration_dir/schedstat.after
...@@ -271,6 +271,7 @@ check_errors() { ...@@ -271,6 +271,7 @@ check_errors() {
move_results() { move_results() {
msg "# Moving results" msg "# Moving results"
sudo chown -R $(id -un):$(id -gn) $TMP_RESULTS_DIR
mv $TMP_RESULTS_DIR/* $RESULTS_DIR/ mv $TMP_RESULTS_DIR/* $RESULTS_DIR/
rm -rf $TMP_RESULTS_DIR rm -rf $TMP_RESULTS_DIR
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment