From 877d53bc54221b05d6cf760daf693b383fe478b1 Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Tue, 5 Feb 2019 11:58:40 +0000 Subject: [PATCH 1/6] wltests: Introduce the WLTEST_REPO_TARGET option Some targets (e.g. Pixel 3) require the utilization of Google's scripts to build kernels and modules. Since this build system uses 'repo' and manifests to manage the source trees and the toolchains directly, it doesn't integrate easily in the existing wltest infrastructure which kind of does that too. In order to work around the issue, introduce a new option (WLTEST_REPO_TARGET) which indicates that a platform uses the Google build system. This option must be set to 'y' in the platform's 'definitions' file. This option is basically used in test_series in order to checkout commits of the repo manifest instead of kernel commits directly. Whenever WLTEST_REPO_TARGET=y, the KERNEL_SRC env variable is supposed to point at a repo folder, not at the kernel tree directly. The location of the kernel tree within the repo is given in the platform code, using the REPO_KERNEL_PATH variable. While at it, clean-up a few typos and unused arguments in test_series. Signed-off-by: Quentin Perret --- tools/wltests/test_series | 103 +++++++++++++++++++++++++++----------- 1 file changed, 75 insertions(+), 28 deletions(-) diff --git a/tools/wltests/test_series b/tools/wltests/test_series index 2826248d4..4703cc1c3 100755 --- a/tools/wltests/test_series +++ b/tools/wltests/test_series @@ -29,7 +29,7 @@ source "${BASE_DIR}/helpers" ################################################################################ PLATFORM=${PLATFORM:-'hikey960_android-4.4'} -KERNEL_SRC=${KERNEL_SRC:-$BASE_DIR/kernel} +KERNEL_SRC=${KERNEL_SRC:-''} SERIES=${SERIES:-''} WA_AGENDA=${WA_AGENDA:-''} TEST_CMD=${TEST_CMD:-'echo "Test DONE!"'} @@ -68,8 +68,7 @@ SCRIPT for each of them. Kernel to test: - -k, --kernel_src PATH The kernel source tree to use. - Default: KERNEL_SRC=../kernel + -k, --kernel_src PATH The kernel source tree or repo to use. -s, --series PATH The series of commits to test. This is the patch of the file containing a list @@ -84,6 +83,12 @@ Kernel to test: If an "ID:" column is present, the commits will be considered in progressive "ID:" order while discarding those with ID=00: + + For targets using the Google build system (e.g. + Pixel 3) the series file refers to commits of + the manifest file whose git tree is located + under "\$KERNEL_SRC/.repo/manifests." + Default: SERIES='' Target device to use for kernel testing: @@ -91,7 +96,7 @@ Target device to use for kernel testing: -p, --platform The platform to target. Available platforms are the subfolders of the top level "platforms" folder. - Default: PLATFORM=juno_android-4.4 + Default: PLATFORM=hikey960_android-4.4 --supported_platforms Print a list of supported platforms which can are valid values for the -p parameter. @@ -118,7 +123,7 @@ Additional arguments: --adb The ADB binary to use. Default: ADB=[ANDROID_HOME/platform-tools/adb|\$(which adb)] --fastboot The FASTBOOT binary to use. - Default: FASTBOOT=[ANDROID_HOME/platform-tools/fatboot|\$(which fatboot)] + Default: FASTBOOT=[ANDROID_HOME/platform-tools/fastboot|\$(which fastboot)] --emeter The Energy Meter used to power-cycle the device. Default: EMETER=ACME @@ -318,14 +323,44 @@ fi done export PLATFORM_OVERLAY_PATH=$PLATFORM_PATH -# Prepare KERNEL_SRC +source $PLATFORM_PATH/definitions + +# On targets that don't use 'repo', KERNEL_SRC == GIT_TREE == KERNEL_TREE +# On targets that do use 'repo': +# - KERNEL_SRC points to the top level of the repo +# - GIT_TREE points to the _manifest_ git tree in the repo +# - KERNEL_TREE points to the _kernel_ git tree in the repo +GIT_TREE="" +KERNEL_TREE="" + export KERNEL_SRC=$(realpath -s $KERNEL_SRC) -grep -E "mainmenu .* Kernel Configuration" $KERNEL_SRC/Kconfig &>/dev/null -if [ $? -ne 0 ]; then - echo - c_error "The \$KERNEL_SRC|--kernel_src seems not to a valid kernel source tree path" - echo - exit $EINVAL +if [ "x$WLTEST_REPO_TARGET" == "xy" ]; then + if [ ! -x "$(command -v repo)" ]; then + echo + c_error "Wltest on this target requires 'repo'. Please follow:" + c_error "https://source.android.com/setup/build/downloading#installing-repo" + echo + exit $ENODEV + fi + if [ ! -d "$KERNEL_SRC/.repo/manifests" ]; then + echo + c_error "The \$KERNEL_SRC|--kernel_src is not a valid repo path" + echo + exit $EINVAL + fi + GIT_TREE="$KERNEL_SRC/.repo/manifests" + KERNEL_TREE="$KERNEL_SRC/$REPO_KERNEL_PATH" +else + # Prepare KERNEL_SRC + grep -E "mainmenu .* Kernel Configuration" $KERNEL_SRC/Kconfig &>/dev/null + if [ $? -ne 0 ]; then + echo + c_error "The \$KERNEL_SRC|--kernel_src is not a valid kernel source tree path" + echo + exit $EINVAL + fi + GIT_TREE="$KERNEL_SRC" + KERNEL_TREE="$KERNEL_SRC" fi # Prepare SERIES @@ -445,7 +480,7 @@ esac box_out \ "Mandatory conf" \ " PLATFORM : $PLATFORM" \ - " KERNEL_SRC : $KERNEL_SRC" \ + " KERNEL_TREE : $KERNEL_TREE" \ " SERIES : $SERIES" \ " WA_AGENDA : $WA_AGENDA" \ " RESULTS : $TEST_CMD_RESULTS" \ @@ -773,7 +808,7 @@ name_sha1() { # Find a name for each possible REF mkfifo tmp_pipe &>/dev/null - git -C $KERNEL_SRC for-each-ref \ + git -C $GIT_TREE for-each-ref \ --sort=-committerdate \ --format='%(objectname:short) %(refname:short)' \ refs/heads/ refs/remotes/ refs/tags | @@ -805,8 +840,8 @@ match_sha1() { # It may happen that a tag pointing to a given commit has # a different SHA1 (signed tag), so check if this this is # the case. - TAG_NAME=$(git -C $KERNEL_SRC describe --exact-match $COMMIT_SHA1 2>/dev/null) || return $EAGAIN - TAG_SHA1=$(git -C $KERNEL_SRC show-ref --hash $TAG_NAME) + TAG_NAME=$(git -C $KERNEL_TREE describe --exact-match $COMMIT_SHA1 2>/dev/null) || return $EAGAIN + TAG_SHA1=$(git -C $KERNEL_TREE show-ref --hash $TAG_NAME) c_info " CommitID of local repo corresponds to tag: $TAG_NAME" [[ $TAG_SHA1 =~ $CURRENT* ]] && return $OK @@ -815,12 +850,11 @@ match_sha1() { build_sha1() { COMMIT_SHA1=$1 - COMMIT_DESC=$2 - ### Prepare KERNEL_SRC for build - pushd $KERNEL_SRC &>/dev/null + ### Prepare GIT_TREE for build + pushd $GIT_TREE &>/dev/null echo - c_info "Checkout kernel: $KERNEL_SRC @ $COMMIT_SHA1..." + c_info "Checkout: $GIT_TREE @ $COMMIT_SHA1..." git checkout $COMMIT_SHA1; ERROR=$? if [ $ERROR -ne 0 ]; then c_error "Failed to checkout [$COMMIT_SHA1]" @@ -829,6 +863,17 @@ build_sha1() { fi popd &>/dev/null + ### Sync the repo if needed + if [ "x$WLTEST_REPO_TARGET" == "xy" ]; then + pushd $KERNEL_SRC &> /dev/null + repo sync -l; ERROR=$? + popd &> /dev/null + if [ $ERROR -ne 0 ]; then + c_error "Failed to sync [$COMMIT_SHA1]" + return $ERROR + fi + fi + ### Build all IMAGES pushd $BASE_DIR &>/dev/null $PLATFORM_PATH/build_images @@ -844,7 +889,7 @@ flash_sha1() { COMMIT_SHA1=$1 COMMIT_DESC=$2 - build_sha1 "$COMMIT_SHA1" "$COMMIT_DESC"; RESULT=$? + build_sha1 "$COMMIT_SHA1"; RESULT=$? [ $RESULT -eq $OK ] || return $RESULT ### Flash generated IMAGES @@ -873,8 +918,10 @@ flash_sha1() { sleep 10 # Add an additional safe margin ### Check that we are running the expected kernel + COMMIT_SHA1=$(git -C $KERNEL_TREE log --format="%h" | head -n 1) match_sha1 $COMMIT_SHA1; ERROR=$? [ $ERROR -eq 0 ] || c_error "Failed to flash kernel [$COMMIT_DESC]!" + return $? } @@ -889,10 +936,10 @@ test_sha1() { c_info "Testing kernel:" c_info " SeriesID : $COMMIT_DESC" c_info " CommitID : $COMMIT_SHA1 $COMMIT_NAME" - echo - c_info "Check current kernel..." - if device_in_adb; then + + if [[ "x$WLTEST_REPO_TARGET" != "xy" && device_in_adb ]]; then + c_info "Check current kernel..." match_sha1 $COMMIT_SHA1 if [ $? -ne $OK ]; then c_info "Kernel update required!" @@ -904,8 +951,8 @@ test_sha1() { fi fi else - c_warning "Device not connected via ADB, cannot check current kernel" - c_warning "Forcing: build, flashing and reboot selected kernel" + c_info "Cannot check current kernel" + c_info "Forcing: build, flashing and reboot selected kernel" flash_sha1 $COMMIT_SHA1 "$COMMIT_DESC"; RESULT=$? [[ $RESULT -ne $EIO ]] || exit $EIO if [[ $RESULT -ne 0 ]]; then @@ -992,14 +1039,14 @@ while read -u10 COMMITS; do COMMIT=${COMMITS%% *} # Translate possible branch name to SHA1 - COMMITS=$(git -C $KERNEL_SRC show-ref -s $COMMIT) + COMMITS=$(git -C $GIT_TREE show-ref -s $COMMIT) if [ $? -ne 0 ]; then COMMIT_SHA1=$COMMIT elif [ $(echo $COMMITS | wc -w) -eq 1 ]; then COMMIT_SHA1=$COMMITS else c_error "The branch name must be univocal, \"$COMMIT\" may refer to:" - for b in $(git -C $KERNEL_SRC show-ref $COMMIT | cut -f 2 -d " "); do + for b in $(git -C $GIT_TREE show-ref $COMMIT | cut -f 2 -d " "); do c_error " $b" done exit $EINVAL -- GitLab From 812bd45e8de0a38f234aecea6f91a1c06a884d85 Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Thu, 21 Feb 2019 15:30:12 +0000 Subject: [PATCH 2/6] wltests: wahoo: Move module flashing procedure to helpers The wahoo platform code configures verity and ADB to make the vendor partition writable, hence enabling module flashing. Since bluecross needs to do the same, move the code into the platform-agnostic 'helpers' file. Signed-off-by: Quentin Perret --- tools/wltests/helpers | 66 +++++++++++++++++++ .../platforms/wahoo_android_v4.4/flash_images | 36 +--------- 2 files changed, 68 insertions(+), 34 deletions(-) diff --git a/tools/wltests/helpers b/tools/wltests/helpers index 8922b3f68..3274d9210 100644 --- a/tools/wltests/helpers +++ b/tools/wltests/helpers @@ -179,6 +179,72 @@ c_extract() { fi } +adb_flash_modules() { + MODULES_FOLDER=$1 + + echo + c_info "Restart ADB in root mode..." + timeout 10 $ADB wait-for-device root &>/dev/null; ERROR=$? + if [[ $ERROR -ne 0 ]]; then + c_error "Cannot restart ADB in root mode" + return $EIO + fi + + timeout 10 $ADB wait-for-device; ERROR=$? + if [[ $ERROR -ne 0 ]]; then + c_error "Device inaccesible" + return $EIO + fi + + # Verity must be disabled one time, right after the first boot, once a + # new set of stock images has been flashed on the device. + # This check is just there to ensure we can remount root rw, otherwise + # wltests will abort and the device must be rebooted by hand. + c_info "Checking that verity is disabled..." + OUTPUT="$($ADB disable-verity)" + echo + echo "$OUTPUT" + echo + if [[ $OUTPUT != *"verity is already disabled"* ]]; then + c_error "Verity not disabled on this device!" + c_warning "It has been disabled now but you have to" + c_warning "manually reboot your device and restart wltests" + echo + echo + return $EIO + fi + + c_info "Remounting / rw..." + timeout 10 $ADB wait-for-device remount &>/dev/null; ERROR=$? + if [[ $ERROR -ne 0 ]]; then + c_error "Remount failed" + return $EIO + fi + + timeout 10 $ADB wait-for-device; ERROR=$? + if [[ $ERROR -ne 0 ]]; then + c_error "Device inaccesible" + return $EIO + fi + + c_info "Pushing kernel modules..." + $ADB shell rm -rf /vendor/lib/modules/*; ERROR=$? + if [[ $ERROR -ne 0 ]]; then + c_error "Failed to remove /vendor/lib/modules/" + return $EIO + fi + for m in $MODULES_FOLDER/*.ko; do + $ADB push $m /vendor/lib/modules/; ERROR=$? + if [[ $ERROR -ne 0 ]]; then + c_error "Failed to flash $m" + return $EIO + fi + done + sleep 5 + + return $OK +} + ################################################################################ # Colors diff --git a/tools/wltests/platforms/wahoo_android_v4.4/flash_images b/tools/wltests/platforms/wahoo_android_v4.4/flash_images index b6fa00f09..2cb87633d 100755 --- a/tools/wltests/platforms/wahoo_android_v4.4/flash_images +++ b/tools/wltests/platforms/wahoo_android_v4.4/flash_images @@ -36,40 +36,8 @@ fi case "$MODE" in ADB) - echo - c_info "Restart ADB in root mode..." - $ADB root &>/dev/null - - # Verity must be disabled one time, right after the first boot, once a - # new set of stock images has been flashed on the device. - # This check is just there to ensure we can remount root rw, otherwise - # wltests will abort and the device must be rebooted by hand. - c_info "Checking that verity is disabled..." - OUTPUT="$($ADB disable-verity)" - echo - echo "$OUTPUT" - echo - if [[ $OUTPUT != *"verity is already disabled"* ]]; then - c_error "Verity not disabled on this device!" - c_warning "It has been disabled now but you have to" - c_warning "manually reboot your device and restart wltests" - echo - echo - exit $EIO - fi - - c_info "Remounting / rw..." - $ADB remount &>/dev/null; ERROR=$? - if [[ $ERROR -ne 0 ]]; then - c_error "Remount failed" - exit $EIO - fi - sleep 10 - - c_info "Pushing kernel modules..." - $ADB shell rm -rf /vendor/lib/modules - $ADB push ${ARTIFACTS_PATH}/push_files/* / - sleep 5 + adb_flash_modules $MODULE_DIR; ERROR=$? + [ $ERROR -eq 0 ] || exit -$ERROR exit $OK ;; -- GitLab From 5b40b59cff3bc35149f7d891329576eb2d85b137 Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Thu, 21 Feb 2019 15:51:49 +0000 Subject: [PATCH 3/6] wltests: Add support for bluecross Add support for Pixel 3 devices, codename bluecross, using the Google build system, see: https://source.android.com/setup/build/building-kernels#building-b1c1 The flash_images script is based on its wahoo equivalent. ~~~ I don't know where to put the instructions to use this so until I find a better place, here they are: 1/ Download the bluecross kernel: $ mkdir my_bluecross_kernel && cd my_bluecross_kernel $ repo init -u https://android.googlesource.com/kernel/manifest -b android-msm-bluecross-4.9-pie-qpr1 $ repo sync 2/ Hack the kernel in private/msm-google, and commit your changes; 3/ Edit the manifest under .repo/manifests/, and add revision="full sha1 of the kernel" to the tag; (4/ OPTIONAL: hack the modules, and update the manifest;) 5/ Commit your manifest changes; 6/ Create a sha1 series file of manifest commits; 7/ lisa-wltest-series -k my_bluecross_kernel -s manifest_series.sha1 Signed-off-by: Quentin Perret --- .../bluecross_android_v4.9/build_images | 8 +++ .../bluecross_android_v4.9/definitions | 8 +++ .../bluecross_android_v4.9/flash_images | 63 +++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100755 tools/wltests/platforms/bluecross_android_v4.9/build_images create mode 100644 tools/wltests/platforms/bluecross_android_v4.9/definitions create mode 100755 tools/wltests/platforms/bluecross_android_v4.9/flash_images diff --git a/tools/wltests/platforms/bluecross_android_v4.9/build_images b/tools/wltests/platforms/bluecross_android_v4.9/build_images new file mode 100755 index 000000000..2cb8027b1 --- /dev/null +++ b/tools/wltests/platforms/bluecross_android_v4.9/build_images @@ -0,0 +1,8 @@ +#!/bin/bash +cd $KERNEL_SRC + +# SKIP_MRPROPER=y saves a lot of time +# SKIP_CP_KERNEL_HDR=y because we don't use them +SKIP_MRPROPER=y SKIP_CP_KERNEL_HDR=y ./build/build.sh +ERROR=$? +[ $ERROR -eq 0 ] || exit -$ERROR diff --git a/tools/wltests/platforms/bluecross_android_v4.9/definitions b/tools/wltests/platforms/bluecross_android_v4.9/definitions new file mode 100644 index 000000000..69fc77b2b --- /dev/null +++ b/tools/wltests/platforms/bluecross_android_v4.9/definitions @@ -0,0 +1,8 @@ +PLATFORM_NAME="Bluecross" +WLTEST_REPO_TARGET="y" +REPO_KERNEL_PATH="private/msm-google" + +# Artifacts generated by Google's build.sh script +ARTIFACTS_PATH="$KERNEL_SRC/out/android-msm-bluecross-4.9/dist" +KERNEL_IMAGE="${KERNEL_IMAGE:-Image.lz4-dtb}" +ANDROID_DTBO_IMAGE="${ANDROID_DTBO_IMAGE:-dtbo.img}" diff --git a/tools/wltests/platforms/bluecross_android_v4.9/flash_images b/tools/wltests/platforms/bluecross_android_v4.9/flash_images new file mode 100755 index 000000000..0699010b5 --- /dev/null +++ b/tools/wltests/platforms/bluecross_android_v4.9/flash_images @@ -0,0 +1,63 @@ +#!/bin/bash + +SCRIPT_DIR=$(dirname $(realpath -s $0)) +BASE_DIR="$SCRIPT_DIR/../.." +source "${BASE_DIR}/helpers" +source "${PLATFORM_PATH}/definitions" + +MODE=${1:-FASTBOOT} + +################################################################################ +# Flash all images required to test a new kernel +################################################################################ + +# Check for DTBO image +ls "${ARTIFACTS_PATH}/${ANDROID_DTBO_IMAGE}" &>/dev/null; ERROR=$? +if [ $ERROR -ne 0 ]; then + c_error "No DTBO image to flash found in $ARTIFACTS_PATH" + exit $ENOENT +fi + +# Check for KERNEL image +ls "${ARTIFACTS_PATH}/${KERNEL_IMAGE}" &>/dev/null; ERROR=$? +if [ $ERROR -ne 0 ]; then + c_error "No KERNEL image to flash found in $ARTIFACTS_PATH" + exit $ENOENT +fi + +# Check for modules to be pushed +ls ${ARTIFACTS_PATH}/*.ko &>/dev/null; ERROR=$? +if [ $ERROR -ne 0 ]; then + c_error "No MODULES to push found in $ARTIFACTS_PATH" + exit $ENOENT +fi + +case "$MODE" in + +ADB) + adb_flash_modules $ARTIFACTS_PATH; ERROR=$? + [ $ERROR -eq 0 ] || exit -$ERROR + + exit $OK + ;; + +FASTBOOT) + echo + c_info "Flashing [$KERNEL_IMAGE] on KERNEL partition..." + $FASTBOOT flash:raw boot ${ARTIFACTS_PATH}/${KERNEL_IMAGE} + ERROR=$? + [ $ERROR -eq 0 ] || exit -$ERROR + + echo + c_info "Flashing [$ANDROID_DTBO_IMAGE] on DTBO partition..." + $FASTBOOT flash dtbo ${ARTIFACTS_PATH}/${ANDROID_DTBO_IMAGE} + ERROR=$? + [ $ERROR -eq 0 ] || exit -$ERROR + + exit $OK + ;; + +esac + +exit -$EINVAL + -- GitLab From 5e76447ee5a5aa26729fd28300c795e51c5cfcaa Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Mon, 25 Feb 2019 12:39:29 +0000 Subject: [PATCH 4/6] test_series: Make match_sha1() more robust The match_sha1() function is used to compare the kernel running on the target with a given sha1. To do so, it issues 'uname -r' on the target and pattern-matches to check whether the sha1 is present in the kernel name or not. However, on targets like Pixel 3, the kernel name is appended with a '_audio' suffix which makes the whole thing fall over. In order to fix this, add another layer of awk filtering in match_sha1() which removes the suffix before the pattern matching. This fixes the issue on P3 and has no impact on existing targets with a 'clean' kernel name. Signed-off-by: Quentin Perret --- tools/wltests/test_series | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/wltests/test_series b/tools/wltests/test_series index 4703cc1c3..68e22afef 100755 --- a/tools/wltests/test_series +++ b/tools/wltests/test_series @@ -834,7 +834,7 @@ match_sha1() { c_info "Current kernel: " c_info " $($ADB shell 'uname -a')" - CURRENT=$($ADB shell 'uname -r' | awk -F "-g" '{print $NF}') + CURRENT=$($ADB shell 'uname -r' | awk -F "-g" '{print $NF}' | awk -F "_" '{print $1}') [[ $COMMIT_SHA1 =~ $CURRENT* ]] && return $OK # It may happen that a tag pointing to a given commit has -- GitLab From f2eeb199ec110d968c6dd08f13266247d6ea1924 Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Tue, 26 Feb 2019 10:11:11 +0000 Subject: [PATCH 5/6] test_series: Change kernel flashing error to warning The flash_sha1() functions checks if the kernel's sha1 is reported by 'uname -r' on the target to ensure the flashing procedure suceeded. However, the sha1 may not be reported in the kernel name whenever it matches a tag, for example. Since this is a perfectly reasonable use-case, let's make the 'uname -r' check fail with a warning instead of an error since most likely we can in fact proceed with the tests safely. While at it, fix two other broken warnings. Signed-off-by: Quentin Perret --- tools/wltests/test_series | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/wltests/test_series b/tools/wltests/test_series index 68e22afef..c4a2d76db 100755 --- a/tools/wltests/test_series +++ b/tools/wltests/test_series @@ -511,7 +511,7 @@ usb_disconnect() { ;; 'MONSOON') # not supported for now - c_warn "Energy meter $EMETER does not support usb_disconnect" + c_warning "Energy meter $EMETER does not support usb_disconnect" ;; *) c_error "Energy meter $EMETER not supported" @@ -530,7 +530,7 @@ usb_connect() { ;; 'MONSOON') # not supported for now - c_warn "Energy meter $EMETER does not support usb_connect" + c_warning "Energy meter $EMETER does not support usb_connect" ;; *) c_error "Energy meter $EMETER not supported" @@ -920,7 +920,7 @@ flash_sha1() { ### Check that we are running the expected kernel COMMIT_SHA1=$(git -C $KERNEL_TREE log --format="%h" | head -n 1) match_sha1 $COMMIT_SHA1; ERROR=$? - [ $ERROR -eq 0 ] || c_error "Failed to flash kernel [$COMMIT_DESC]!" + [ $ERROR -eq 0 ] || c_warning "Kernel [$COMMIT_DESC] may not be flashed on the target" return $? } -- GitLab From c9dc17e14eb8854b7f6dd4f45903f628decbd870 Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Fri, 8 Mar 2019 09:06:15 +0000 Subject: [PATCH 6/6] test_series: Fix USB reconnection A typo in the command to disconnect the USB using ACME makes the command fail, which prevents the USB reconnection to actually happen. Also, the retry delay is sometimes too short for the device to be visible using ADB. In order to fix these issues, fix the typo and increase the retry delay. Signed-off-by: Quentin Perret --- tools/wltests/test_series | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/wltests/test_series b/tools/wltests/test_series index c4a2d76db..d5d084014 100755 --- a/tools/wltests/test_series +++ b/tools/wltests/test_series @@ -506,7 +506,7 @@ usb_disconnect() { if [ $DRYRUN ]; then return; fi case $EMETER in 'ACME') - sh root@$ACME_IP \ + ssh root@$ACME_IP \ "echo 0 > /sys/bus/iio/devices/iio:$ACME_USB/in_active" ;; 'MONSOON') @@ -598,9 +598,10 @@ device_connected() { return $ENODEV fi usb_disconnect - c_warning "Check again in 1s..." sleep 1 usb_connect + c_warning "Check again in 10s..." + sleep 10 done return $OK } -- GitLab