Uh oh!
There was an error while loading. Please reload this page.
case-lib: fix pulseaudio restore couldn't work - #266
Conversation
Bin-QA
commented
Jun 29, 2020
verify script: |
aiChaoSONG
commented
Jun 29, 2020
@Bin-QA I suggest you split this PR into 2 commits.
|
fredoh9
left a comment
There was a problem hiding this comment.
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.
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 |
libinyang
commented
Jun 30, 2020
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 |
plbossart
commented
Jul 1, 2020
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! |
marc-hb
commented
Jul 1, 2020
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? |
marc-hb
commented
Jul 1, 2020
Is our pulseaudio installation and configuration consistent across DUTs? |
aiChaoSONG
commented
Jul 6, 2020
I remember that @keqiaozhang uninstall pulseaudio from all DUTs, don't know why it is still there. |
keqiaozhang
commented
Jul 6, 2020
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>
marc-hb
commented
Jul 27, 2020
Is the Is it compatible with Ubuntu 20.04? |
xiulipan
commented
Sep 2, 2020
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