Skip to content
Commit 0088390b authored by Javi Merino's avatar Javi Merino
Browse files

libs/wlgen/workload: fix rt-app execution when using cgroups

Commit 655e3f03 ("libs/wlgen/rtapp: fix calibration for versions of Android
>=N") added an innocent 2>&1 at the end of the rtapp command.  When
running rtapp with cgroups enabled on an Android system this gets
executed as the following monstrosity:

adb -s 10.1.210.35:5555 shell '(echo '\''/data/local/tmp/bin/shutils cgroups_run_into / '\''\\'\'''\''/data/local/tmp/bin/rt-app /data/local/tmp/devlib-target/run_dir/mixprof_00.json 2>&1'\''\\'\'''\'''\'' | su); echo "$?"

The fact that the 2>&1 has a host of ' after it ends up confusing the
shell, which tries to redirect the stderr to file descriptor 1' , which
doesn't exist and it fails (but crucially, devlib doesn't see that it
failed, echo $? returns 0).

If we add a space between 2>&1 and it's single quotes, we avoid
confusing the shell.  The command now becomes:

adb -s 10.1.210.35:5555 shell '(echo '\''/data/local/tmp/bin/shutils cgroups_run_into / '\''\\'\'''\''/data/local/tmp/bin/rt-app /data/local/tmp/devlib-target/run_dir/mixprof_00.json 2>&1 '\''\\'\'''\'''\'' | su); echo "$?"
parent 692d52fd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment