-
Notifications
You must be signed in to change notification settings - Fork 59
case-lib: fix pulseaudio restore couldn't work #266
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
Conversation
|
verify script: |
|
@Bin-QA I suggest you split this PR into 2 commits.
|
fredoh9
left a comment
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.
Looks good. For first commit text, a typo. How about just
Use --preserve-env=PATH instead of env 'PATH=$PATH'
for sudo parameter
marc-hb
left a comment
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.
This commit message is really too short and doesn't really explain anything.
Please add the error messages to the commit message, a Fixes: #NNN for any bug filed about this (I think there was at least one), explain why these error messages were seen and why this gets rid of them.
|
On my Ubuntu 20.04 system: You can't re-use |
@marc-hb |
Mostly we should not use |
|
Each Linux distribution may use pulseaudio slightly differently. We should stick to how how each distribution configures it. A very quick search didn't find any summary for Ubuntu. I found something interesting for Debian which may or may not apply to Ubuntu https://wiki.debian.org/PulseAudio The name If we don't have enough time now to figure out how to disable/re-enable it cleanly on Ubuntu then we should just uninstall it and postpone pulseaudio tests until we have time to do it properly = not using |
|
Looks like this PulseAudio issue is polluting quite a few platforms. https://sof-ci.01.org/linuxpr/PR1984/build4016/devicetest/ can we please prioritize this? Thanks! |
|
OK, I checked the ;;
- '1') # sudo without passwd
- eval $(echo "$SUDO_CMD env 'PATH=$PATH' $*")
- return $?
+ '1') cmd="$SUDO_CMD env 'PATH=$PATH' $*" # sudo without passwd
;;
- '2') # sudo need passwd
- eval $(echo "echo '$SUDO_PASSWD' | $SUDO_CMD -S env 'PATH=$PATH' $*")
- return $?
+ '2') cmd="echo '$SUDO_PASSWD' | $SUDO_CMD -S env 'PATH=$PATH' $*" # sudo need passwd
;;
*) # without sudo permission
Single-quoting @Bin-QA please submit the minimum, thoroughly tested change that fixes only the Let's postpone longer pulseaudio discussion and redesigns for another time. This UNTESTED suggestion may be enough: case $SUDO_LEVEL in
'0') cmd="$*" # as root
;;
- '1') cmd="$SUDO_CMD env 'PATH=$PATH' $*" # sudo without passwd
+ '1') cmd="$SUDO_CMD env PATH=$PATH $*" # sudo without passwd
;;
- '2') cmd="echo '$SUDO_PASSWD' | $SUDO_CMD -S env 'PATH=$PATH' $*" # sudo need passwd
+ '2') cmd="echo $SUDO_PASSWD | $SUDO_CMD -S env PATH=$PATH $*" # sudo need passwd
;;
*) # without sudo permissionIt won't support whitespace in PATH but it's simpler and I doubt we ever supported that anyway. Commit c7d2477 was merged on 27th so I wonder how this error wasn't noticed earlier, any clue? Has anything related to pulseaudio changed recently? |
Is our pulseaudio installation and configuration consistent across DUTs? |
I remember that @keqiaozhang uninstall pulseaudio from all DUTs, don't know why it is still there. |
Yes, I uninstalled pulseaudio for all our DUTs months ago and added this feature in deploy.sh. I checked and found that those DUTs have been upgraded to Ubuntu 20.04 by someone and forgot to uninstall the pulseaudio. |
Use --preserve-env=PATH instead of env 'PATH=$PATH' for sudo parameter Signed-off-by: Wu, BinX <binx.wu@intel.com>
|
Is the Is it compatible with Ubuntu 20.04? |
|
Close as new version merged. |
hijack.sh modify sudo function:
use
--preserve-env=PATHinstead ofenv 'PATH=$PATH'which can be worked at 20.04 test environment
remove 'nohup' for
sudocommand to avoid resetsudokill extend 'sudo' process for pulseaudio after restore finish
Signed-off-by: Wu, BinX binx.wu@intel.com
PS: see also #289