Skip to content

Commit

Permalink
test-socwatch.sh: we don't need to load socwatch module manually
Browse files Browse the repository at this point in the history
We only use socwatch tool to read the power data for power measurement
in this case, we can directly use the latest released version, so there
is no need to pre-compile the driver.

Signed-off-by: Keqiao Zhang <[email protected]>
  • Loading branch information
keqiaozhang committed Jan 31, 2024
1 parent a7e28c8 commit cf6c2f5
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions test-case/test-socwatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ duration=${OPT_VAL['d']}
wait_time=${OPT_VAL['w']}
loop_count=${OPT_VAL['l']}

check_socwatch_module_loaded()
{
lsmod | grep -q socwatch || die "socwatch is not loaded"
}

socwatch_test_once()
{
local i="$1"
Expand All @@ -62,10 +57,6 @@ socwatch_test_once()
# set up checkpoint for each iteration
setup_kernel_check_point

# load socwatch module, if the module is loaded, go ahead with the testing (-q)
sudo "$SOCWATCH_PATH"/drivers/insmod-socwatch -q
check_socwatch_module_loaded || die "socwatch module not loaded"

( set -x
sudo "$SOCWATCH_PATH"/socwatch -t "$duration" -s "$wait_time" "${SOCWATCH_FEATURE_PARAMS[@]}" -o "$SOCWATCH_PATH/sofsocwatch-$i" ) ||
die "socwatch returned $?"
Expand All @@ -81,8 +72,6 @@ socwatch_test_once()
# check kernel log for each iteration to catch issues
sof-kernel-log-check.sh "$KERNEL_CHECKPOINT" || die "Caught error in kernel log"

# unload socwatch module
sudo "$SOCWATCH_PATH"/drivers/rmmod-socwatch
}

main()
Expand Down

0 comments on commit cf6c2f5

Please sign in to comment.