action #153304
closedThe wait_serial in script_run on a serial console fails for very long commands
0%
Description
I'm working on a change for Fedora openQA to run a command that can be very long from a serial console. It seems when a command is very long and you run it from a serial console, the testapi::wait_serial($cmd . $marker, no_regex => 1, quiet => $args{quiet});
call that happens in the middle of script_run (the distribution.pm one) on serial consoles fails because part of the command is lost. This is the failure I get:
# wait_serial expected: "/usr/local/bin/setup_repos.py -u breeze-icon-theme-5.111.0-1.fc39,calibre-6.28.1-2.fc39,celestia-1.7.0~320230812.gitcbdeede-5.fc39,deepin-qt5integration-5.6.11-2.fc39,deepin-qt5platform-plugins-5.6.12-2.fc39,dolphin-emu-5.0.19870-3.fc39,extra-cmake-modules-5.111.0-1.fc39,fcitx5-qt-5.1.1-6.fc39,fcitx-qt5-1.2.6-16.fc39,gammaray-2.11.3-13.fc39,kddockwidgets-1.6.0-13.fc39,keepassxc-2.7.6-3.fc39,kf5-5.111.0-1.fc39,kf5-akonadi-server-23.08.2-2.fc39,kf5-attica-5.111.0-1.fc39,kf5-baloo-5.111.0-1.fc39,kf5-bluez-qt-5.111.0-1.fc39,kf5-frameworkintegration-5.111.0-2.fc39,kf5-kactivities-5.111.0-1.fc39,kf5-kactivities-stats-5.111.0-1.fc39,kf5-kapidox-5.111.0-1.fc39,kf5-karchive-5.111.0-1.fc39,kf5-kauth-5.111.0-1.fc39,kf5-kbookmarks-5.111.0-1.fc39,kf5-kcalendarcore-5.111.0-1.fc39,kf5-kcmutils-5.111.0-1.fc39,kf5-kcodecs-5.111.0-1.fc39,kf5-kcompletion-5.111.0-1.fc39,kf5-kconfig-5.111.0-1.fc39,kf5-kconfigwidgets-5.111.0-1.fc39,kf5-kcontacts-5.111.0-1.fc39,kf5-kcoreaddons-5.111.0-1.fc39,kf5-kcrash-5.111.0-1.fc39,kf5-kdav-5.111.0-1.fc39,kf5-kdbusaddons-5.111.0-1.fc39,kf5-kdeclarative-5.111.0-1.fc39,kf5-kded-5.111.0-1.fc39,kf5-kdelibs4support-5.111.0-1.fc39,kf5-kdesignerplugin-5.111.0-1.fc39,kf5-kdesu-5.111.0-1.fc39,kf5-kdewebkit-5.111.0-1.fc39,kf5-kdnssd-5.111.0-1.fc39,kf5-kdoctools-5.111.0-1.fc39,kf5-kemoticons-5.111.0-1.fc39,kf5-kfilemetadata-5.111.0-1.fc39,kf5-kglobalaccel-5.111.0-1.fc39,kf5-kguiaddons-5.111.0-1.fc39,kf5-kholidays-5.111.0-1.fc39,kf5-khtml-5.111.0-1.fc39,kf5-ki18n-5.111.0-1.fc39,kf5-kiconthemes-5.111.0-1.fc39,kf5-kidletime-5.111.0-1.fc39,kf5-kimageformats-5.111.0-1.fc39,kf5-kinit-5.111.0-1.fc39,kf5-kio-5.111.0-1.fc39,kf5-kirigami2-5.111.0-1.fc39,kf5-kitemmodels-5.111.0-1.fc39,kf5-kitemviews-5.111.0-1.fc39,kf5-kjobwidgets-5.111.0-1.fc39,kf5-kjs-5.111.0-1.fc39,kf5-kjsembed-5.111.0-1.fc39,kf5-kmediaplayer-5.111.0-1.fc39,kf5-knewstuff-5.111.0-1.fc39,kf5-knotifications-5.111.0-1.fc39,kf5-knotifyconfig-5.111.0-1.fc39,kf5-kpackage-5.111.0-1.fc39,kf5-kparts-5.111.0-1.fc39,kf5-kpeople-5.111.0-1.fc39,kf5-kplotting-5.111.0-1.fc39,kf5-kpty-5.111.0-1.fc39,kf5-kquickcharts-5.111.0-1.fc39,kf5-kross-5.111.0-1.fc39,kf5-krunner-5.111.0-1.fc39,kf5-kservice-5.111.0-1.fc39,kf5-ktexteditor-5.111.0-1.fc39,kf5-ktextwidgets-5.111.0-1.fc39,kf5-kunitconversion-5.111.0-1.fc39,kf5-kwallet-5.111.0-1.fc39,kf5-kwayland-5.111.0-2.fc39,kf5-kwidgetsaddons-5.111.0-1.fc39,kf5-kwindowsystem-5.111.0-1.fc39,kf5-kxmlgui-5.111.0-1.fc39,kf5-kxmlrpcclient-5.111.0-1.fc39,kf5-modemmanager-qt-5.111.0-1.fc39,kf5-networkmanager-qt-5.111.0-1.fc39,kf5-plasma-5.111.0-1.fc39,kf5-prison-5.111.0-1.fc39,kf5-purpose-5.111.0-1.fc39,kf5-solid-5.111.0-1.fc39,kf5-sonnet-5.111.0-1.fc39,kf5-syndication-5.111.0-1.fc39,kf5-syntax-highlighting-5.111.0-1.fc39,kf5-threadweaver-5.111.0-1.fc39,layer-shell-qt-5.27.8-2.fc39,obs-studio-30.0.0~rc2-1.fc39,oxygen-icon-theme-5.111.0-1.fc39,plasma-integration-5.27.8-2.fc39,python-pyqt6-6.6.0-1.fc39,python-pyqt6-charts-6.6.0-1.fc39,python-pyqt6-sip-13.6.0-1.fc39,python-pyqt6-webengine-6.6.0-1.fc39,python-qt5-5.15.9-7.fc39,python-ytmusicapi-1.3.0-1.fc39,qadwaitadecorations-0.1.3-1.fc39,qbs-2.1.1-3.fc39,qcoro-0.9.0-7.fc39,qgnomeplatform-0.9.2-4.fc39,qqc2-desktop-style-5.111.0-1.fc39,qt5-5.15.11-1.fc39,qt5ct-1.1-19.fc39,qt5-qt3d-5.15.11-1.fc39,qt5-qtbase-5.15.11-3.fc39,qt5-qtcharts-5.15.11-1.fc39,qt5-qtconnectivity-5.15.11-1.fc39,qt5-qtdatavis3d-5.15.11-1.fc39,qt5-qtdeclarative-5.15.11-2.fc39,qt5-qtdoc-5.15.11-1.fc39,qt5-qtgamepad-5.15.11-1.fc39,qt5-qtgraphicaleffects-5.15.11-1.fc39,qt5-qtimageformats-5.15.11-1.fc39,qt5-qtlocation-5.15.11-1.fc39,qt5-qtmultimedia-5.15.11-1.fc39,qt5-qtnetworkauth-5.15.11-1.fc39,qt5-qtquickcontrols2-5.15.11-1.fc39,qt5-qtquickcontrols-5.15.11-1.fc39,qt5-qtremoteobjects-5.15.11-1.fc39,qt5-qtscript-5.15.11-1.fc39,qt5-qtscxml-5.15.11-1.fc39,qt5-qtsensors-5.15.11-1.fc39,qt5-qtserialbus-5.15.11-1.fc39,qt5-qtserialport-5.15.11-1.fc39,qt5-qtspeech-5.15.11-1.fc39,qt5-qtsvg-5.15.11-1.fc39,qt5-qttools-5.15.11-1.fc39,qt5-qttranslations-5.15.11-1.fc39,qt5-qtvirtualkeyboard-5.15.11-1.fc39,qt5-qtwayland-5.15.11-1.fc39,qt5-qtwebchannel-5.15.11-1.fc39,qt5-qtwebengine-5.15.12-9.fc39,qt5-qtwebkit-5.212.0-0.79alpha4.fc39,qt5-qtwebsockets-5.15.11-1.fc39,qt5-qtwebview-5.15.11-1.fc39,qt5-qtx11extras-5.15.11-1.fc39,qt5-qtxmlpatterns-5.15.11-1.fc39,qt6-6.6.0-1.fc39,qt6ct-0.9-3.fc39,qt6-qt3d-6.6.0-1.fc39,qt6-qt5compat-6.6.0-1.fc39,qt6-qtbase-6.6.0-2.fc39,qt6-qtcharts-6.6.0-1.fc39,qt6-qtconnectivity-6.6.0-1.fc39,qt6-qtdatavis3d-6.6.0-1.fc39,qt6-qtdeclarative-6.6.0-1.fc39,qt6-qthttpserver-6.6.0-1.fc39,qt6-qtimageformats-6.6.0-1.fc39,qt6-qtlanguageserver-6.6.0-1.fc39,qt6-qtlocation-6.6.0-1.fc39,qt6-qtlottie-6.6.0-1.fc39,qt6-qtmultimedia-6.6.0-1.fc39,qt6-qtnetworkauth-6.6.0-1.fc39,qt6-qtpositioning-6.6.0-1.fc39,qt6-qtquick3d-6.6.0-1.fc39,qt6-qtquicktimeline-6.6.0-1.fc39,qt6-qtremoteobjects-6.6.0-1.fc39,qt6-qtscxml-6.6.0-1.fc39,qt6-qtsensors-6.6.0-1.fc39,qt6-qtserialbus-6.6.0-1.fc39,qt6-qtserialport-6.6.0-1.fc39,qt6-qtshadertools-6.6.0-1.fc39,qt6-qtspeech-6.6.0-1.fc39,qt6-qtsvg-6.6.0-3.fc39,qt6-qttools-6.6.0-1.fc39,qt6-qttranslations-6.6.0-1.fc39,qt6-qtvirtualkeyboard-6.6.0-1.fc39,qt6-qtwayland-6.6.0-1.fc39,qt6-qtwebchannel-6.6.0-1.fc39,qt6-qtwebengine-6.6.0-2.fc39,qt6-qtwebsockets-6.6.0-1.fc39,qt6-qtwebview-6.6.0-1.fc39,qt-creator-12.0.0-0.2.fc39,QXlsx-1.4.6-8.fc39,sip6-6.7.12-1.fc39,stellarium-23.2-6.fc39 -c x86_64; echo mm6oS-\$?-"
# Result:
oticons-5.111.0-1.fc39,kf5-kfilemetadata-5.111.0-1.fc39,kf5-kglobalaccel-5.111.0-1.fc39,kf5-kguiaddons-5.111.0-1.fc39,kf5-kholidays-5.111.0-1.fc39,kf5-khtml-5.111.0-1.fc39,kf5-ki18n-5.111.0-1.fc39,kf5-kiconthemes-5.111.0-1.fc39,kf5-kidletime-5.111.0-1.fc39,kf5-kimageformats-5.111.0-1.fc39,kf5-kinit-5.111.0-1.fc39,kf5-kio-5.111.0-1.fc39,kf5-kirigami2-5.111.0-1.fc39,kf5-kitemmodels-5.111.0-1.fc39,kf5-kitemviews-5.111.0-1.fc39,kf5-kjobwidgets-5.111.0-1.fc39,kf5-kjs-5.111.0-1.fc39,kf5-kjsembed-5.111.0-1.fc39,kf5-kmediaplayer-5.111.0-1.fc39,kf5-knewstuff-5.111.0-1.fc39,kf5-knotifications-5.111.0-1.fc39,kf5-knotifyconfig-5.111.0-1.fc39,kf5-kpackage-5.111.0-1.fc39,kf5-kparts-5.111.0-1.fc39,kf5-kpeople-5.111.0-1.fc39,kf5-kplotting-5.111.0-1.fc39,kf5-kpty-5.111.0-1.fc39,kf5-kquickcharts-5.111.0-1.fc39,kf5-kross-5.111.0-1.fc39,kf5-krunner-5.111.0-1.fc39,kf5-kservice-5.111.0-1.fc39,kf5-ktexteditor-5.111.0-1.fc39,kf5-ktextwidgets-5.111.0-1.fc39,kf5-kunitconversion-5.111.0-1.fc39,kf5-kwallet-5.111.0-1.fc39,kf5-kwayland-5.111.0-2.fc39,kf5-kwidgetsaddons-5.111.0-1.fc39,kf5-kwindowsystem-5.111.0-1.fc39,kf5-kxmlgui-5.111.0-1.fc39,kf5-kxmlrpcclient-5.111.0-1.fc39,kf5-modemmanager-qt-5.111.0-1.fc39,kf5-networkmanager-qt-5.111.0-1.fc39,kf5-plasma-5.111.0-1.fc39,kf5-prison-5.111.0-1.fc39,kf5-purpose-5.111.0-1.fc39,kf5-solid-5.111.0-1.fc39,kf5-sonnet-5.111.0-1.fc39,kf5-syndication-5.111.0-1.fc39,kf5-syntax-highlighting-5.111.0-1.fc39,kf5-threadweaver-5.111.0-1.fc39,layer-shell-qt-5.27.8-2.fc39,obs-studio-30.0.0~rc2-1.fc39,oxygen-icon-theme-5.111.0-1.fc39,plasma-integration-5.27.8-2.fc39,python-pyqt6-6.6.0-1.fc39,python-pyqt6-charts-6.6.0-1.fc39,python-pyqt6-sip-13.6.0-1.fc39,python-pyqt6-webengine-6.6.0-1.fc39,python-qt5-5.15.9-7.fc39,python-ytmusicapi-1.3.0-1.fc39,qadwaitadecorations-0.1.3-1.fc39,qbs-2.1.1-3.fc39,qcoro-0.9.0-7.fc39,qgnomeplatform-0.9.2-4.fc39,qqc2-desktop-style-5.111.0-1.fc39,qt5-5.15.11-1.fc39,qt5ct-1.1-19.fc39,qt5-qt3d-5.15.11-1.fc39,qt5-qtbase-5.15.11-3.fc39,qt5-qtcharts-5.15.11-1.fc39,qt5-qtconnectivity-5.15.11-1.fc39,qt5-qtdatavis3d-5.15.11-1.fc39,qt5-qtdeclarative-5.15.11-2.fc39,qt5-qtdoc-5.15.11-1.fc39,qt5-qtgamepad-5.15.11-1.fc39,qt5-qtgraphicaleffects-5.15.11-1.fc39,qt5-qtimageformats-5.15.11-1.fc39,qt5-qtlocation-5.15.11-1.fc39,qt5-qtmultimedia-5.15.11-1.fc39,qt5-qtnetworkauth-5.15.11-1.fc39,qt5-qtquickcontrols2-5.15.11-1.fc39,qt5-qtquickcontrols-5.15.11-1.fc39,qt5-qtremoteobjects-5.15.11-1.fc39,qt5-qtscript-5.15.11-1.fc39,qt5-qtscxml-5.15.11-1.fc39,qt5-qtsensors-5.15.11-1.fc39,qt5-qtserialbus-5.15.11-1.fc39,qt5-qtserialport-5.15.11-1.fc39,qt5-qtspeech-5.15.11-1.fc39,qt5-qtsvg-5.15.11-1.fc39,qt5-qttools-5.15.11-1.fc39,qt5-qttranslations-5.15.11-1.fc39,qt5-qtvirtualkeyboard-5.15.11-1.fc39,qt5-qtwayland-5.15.11-1.fc39,qt5-qtwebchannel-5.15.11-1.fc39,qt5-qtwebengine-5.15.12-9.fc39,qt5-qtwebkit-5.212.0-0.79alpha4.fc39,qt5-qtwebsockets-5.15.11-1.fc39,qt5-qtwebview-5.15.11-1.fc39,qt5-qtx11extras-5.15.11-1.fc39,qt5-qtxmlpatterns-5.15.11-1.fc39,qt6-6.6.0-1.fc39,qt6ct-0.9-3.fc39,qt6-qt3d-6.6.0-1.fc39,qt6-qt5compat-6.6.0-1.fc39,qt6-qtbase-6.6.0-2.fc39,qt6-qtcharts-6.6.0-1.fc39,qt6-qtconnectivity-6.6.0-1.fc39,qt6-qtdatavis3d-6.6.0-1.fc39,qt6-qtdeclarative-6.6.0-1.fc39,qt6-qthttpserver-6.6.0-1.fc39,qt6-qtimageformats-6.6.0-1.fc39,qt6-qtlanguageserver-6.6.0-1.fc39,qt6-qtlocation-6.6.0-1.fc39,qt6-qtlottie-6.6.0-1.fc39,qt6-qtmultimedia-6.6.0-1.fc39,qt6-qtnetworkauth-6.6.0-1.fc39,qt6-qtpositioning-6.6.0-1.fc39,qt6-qtquick3d-6.6.0-1.fc39,qt6-qtquicktimeline-6.6.0-1.fc39,qt6-qtremoteobjects-6.6.0-1.fc39,qt6-qtscxml-6.6.0-1.fc39,qt6-qtsensors-6.6.0-1.fc39,qt6-qtserialbus-6.6.0-1.fc39,qt6-qtserialport-6.6.0-1.fc39,qt6-qtshadertools-6.6.0-1.fc39,qt6-qtspeech-6.6.0-1.fc39,qt6-qtsvg-6.6.0-3.fc39,qt6-qttools-6.6.0-1.fc39,qt6-qttranslations-6.6.0-1.fc39,qt6-qtvirtualkeyboard-6.6.0-1.fc39,qt6-qtwayland-6.6.0-1.fc39,qt6-qtwebchannel-6.6.0-1.fc39,qt6-qtwebengine-6.6.0-2.fc39,qt6-qtwebsockets-6.6.0-1.fc39,qt6-qtwebview-6.6.0-1.fc39,qt-creator-12.0.0-0.2.fc39,QXlsx-1.4.6-8.fc39,sip6-6.7.12-1.fc39,stellarium-23.2-6.fc39 -c x86_64; echo mm6oS-$?-
note how the 'result' is the last 4096 characters of the 5404-character string, so there seems to be a 4096 character limit we're running into somewhere in here.
I can probably work around this by having the test write the build list to a file in smaller chunks and then having the script read it in from the file, or something like that, but it's a bit of a pain. I want to run this command from a serial console precisely because it's very long, and typing it into a regular console takes a long time (and is obviously subject to potential typing errors).