Skip to content

Commit 6f54222

Browse files
committed
Minor fix for DSP test
This commit addresses the timing issue to run adsprpcd binary - Here call trace now will accurately show the output - Cleanup is done smoothly Signed-off-by: Vamsee Narapareddi <[email protected]>
1 parent 59365c8 commit 6f54222

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

Runner/suites/Multimedia/DSP_AudioPD/run.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ check_dependencies adsprpcd
4545
adsprpcd &
4646
PID=$!
4747

48+
sleep 5
49+
4850
if [ -z "$PID" ]; then
4951
echo "Failed to start the binary"
5052
exit 1
@@ -60,20 +62,17 @@ check_stack_trace() {
6062
return 1
6163
fi
6264
}
65+
6366
# Print overall test result
6467
if check_stack_trace "$PID"; then
6568
log_pass "$TESTNAME : Test Passed"
6669
echo "$TESTNAME PASS" > "$res_file"
70+
kill_process
6771
exit 0
6872
else
6973
log_fail "$TESTNAME : Test Failed"
7074
echo "$TESTNAME FAIL" > "$res_file"
75+
kill_process
7176
exit 1
7277
fi
73-
74-
log_info "Kill the process"
75-
if kill -0 "$PID" 2>/dev/null; then
76-
kill -9 "$PID"
77-
wait "$PID"
78-
fi
79-
log_info "-------------------Completed $TESTNAME Testcase----------------------------"
78+
log_info "-------------------Completed $TESTNAME Testcase----------------------------"

Runner/utils/functestlib.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3684,3 +3684,11 @@ ensure_network_online() {
36843684
unset net_script_path net_ifaces net_wifi net_ifc net_rc net_had_any_ip
36853685
return 1
36863686
}
3687+
3688+
kill_process() {
3689+
log_info "Kill the process"
3690+
if kill -0 "$PID" 2>/dev/null; then
3691+
kill -9 "$PID"
3692+
wait "$PID"
3693+
fi
3694+
}

0 commit comments

Comments
 (0)