-
Notifications
You must be signed in to change notification settings - Fork 59
Fix skipping a test in test-jack-detection. #1313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix skipping a test in test-jack-detection. #1313
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit subject and message are quite vague. You could be more specific, something like: "Skip before enabling logs to avoid failure".
Also: why does the moved line fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because in this case the log is empty, and an error is raised:
[ERROR] Empty logfile
commit msg - I'll change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because in this case the log is empty, and an error is raised:
[ERROR] Empty logfile
This is still not clear; there are multiple tests that do that in the same order and they never failed like this.
git grep -e skip_test -e start_log_
test-case/volume-basic-test.sh
test-case/multiple-pause-resume.sh
test-case/test-jack-detection-playback-capture.sh
test-case/test-mic-privacy.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think this commit is just hiding another, unknown issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark this is not the same case. For example volume-basic-test.sh
Between a logger_disabled and first appearance of skip_test there are many of commands generate logs to log file.
start_test
[[ -z $tplg ]] && die "Missing tplg file needed to run"
func_pipeline_export "$tplg" "type:playback"
logger_disabled || func_lib_start_log_collect
[[ $PIPELINE_COUNT -eq 0 ]] && die "Missing playback pipeline for aplay to run"
initialize_audio_params "0"
# play into background, this will wake up DSP and IPC. Need to clean after the test
aplay_opts -D "$dev" -c "$channel" -r "$rate" -f "$fmts" /dev/zero &
sleep 1
check_alsa_tool_process
sofcard=${SOFCARD:-0}
# https://mywiki.wooledge.org/BashFAQ/024 why cant I pipe data to read?
readarray -t pgalist < <("$TOPDIR"/tools/topo_vol_kcontrols.py "$tplg")
# This (1) provides some logging (2) avoids skip_test if amixer fails
get_sof_controls "$sofcard"
dlogi "pgalist number = ${#pgalist[@]}"
[[ ${#pgalist[@]} -ne 0 ]] || skip_test "No PGA control is available"
| sub(/^.*: values=/, "", $0) | ||
| print $0 | ||
| found=0 | ||
| }') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is a good opportunity to extract this to some new, separate something.awk file that would be easier to test and re-usable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to separate awk file
The test ends with FAIL status despite the method skip_test being called next enabling logs. Reason of a fail: "Empty logfile" Signed-off-by: Artur Wilczak <arturx.wilczak@intel.com>
Add the three new test parameters: 1. headphone device name. 2. headset mic device name. 3. waiting time for change device state. Fix the function for checking a device state. Signed-off-by: Artur Wilczak <arturx.wilczak@intel.com>
Fix skip if no module named: usbrelay. Add skip if no relays hardware are detected. Signed-off-by: Artur Wilczak <arturx.wilczak@intel.com>
ba44dda to
a7c0c66
Compare
Fix skip if no module named: usbrelay.
Add skip if no relays hardware are detected.
Before the fix the test failed, after fixed is skipped: