[Why] If the current os has not been integrated into lkp-tests, run method `detect_system`, then var `$_system_name_lowercase` will be 'unknown'. So we should adapt this.
[Error] + local DISTRO=unknown ++ echo ntpdate ++ /home/yuchuan/lkp-tests/sbin/adapt-packages unknown Traceback (most recent call last): 3: from /home/yuchuan/lkp-tests/sbin/adapt-packages:11:in `<main>' 2: from /usr/share/ruby/psych.rb:497:in `load_file' 1: from /usr/share/ruby/psych.rb:497:in `open' /usr/share/ruby/psych.rb:497:in `initialize': No such file or directory @ rb_sysopen - /home/yuchuan/lkp-tests/distro/adaptation/unknown (Errno::ENOENT)
[How] If the current os has not been integrated into lkp-tests, then return.
Signed-off-by: Yu Chuan 13186087857@163.com --- lib/bootstrap.sh | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/lib/bootstrap.sh b/lib/bootstrap.sh index 7d15bb370fa9..cbf867ce322f 100755 --- a/lib/bootstrap.sh +++ b/lib/bootstrap.sh @@ -240,6 +240,10 @@ run_ntpdate() has_cmd ntpdate || { detect_system local DISTRO=$_system_name_lowercase + [ "$DISTRO" == "unknown" ] && { + echo "[WARNING] current os cannot be recognized by lkp-test." + return + } . $LKP_SRC/distro/installer/$DISTRO $(echo ntpdate | $LKP_SRC/sbin/adapt-packages $DISTRO) }
Please ignore this email.
-------- Thanks Yu Chuan
On Mon, Jan 04, 2021 at 03:57:38PM +0800, Yu Chuan wrote:
[Why] If the current os has not been integrated into lkp-tests, run method `detect_system`, then var `$_system_name_lowercase` will be 'unknown'. So we should adapt this.
[Error]
- local DISTRO=unknown
++ echo ntpdate ++ /home/yuchuan/lkp-tests/sbin/adapt-packages unknown Traceback (most recent call last): 3: from /home/yuchuan/lkp-tests/sbin/adapt-packages:11:in `<main>' 2: from /usr/share/ruby/psych.rb:497:in `load_file' 1: from /usr/share/ruby/psych.rb:497:in `open' /usr/share/ruby/psych.rb:497:in `initialize': No such file or directory @ rb_sysopen - /home/yuchuan/lkp-tests/distro/adaptation/unknown (Errno::ENOENT)
[How] If the current os has not been integrated into lkp-tests, then return.
Signed-off-by: Yu Chuan 13186087857@163.com
lib/bootstrap.sh | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/lib/bootstrap.sh b/lib/bootstrap.sh index 7d15bb370fa9..cbf867ce322f 100755 --- a/lib/bootstrap.sh +++ b/lib/bootstrap.sh @@ -240,6 +240,10 @@ run_ntpdate() has_cmd ntpdate || { detect_system local DISTRO=$_system_name_lowercase
[ "$DISTRO" == "unknown" ] && {
echo "[WARNING] current os cannot be recognized by lkp-test."
return
. $LKP_SRC/distro/installer/$DISTRO $(echo ntpdate | $LKP_SRC/sbin/adapt-packages $DISTRO) }}
-- 2.23.0