Skip to contentSkip to conversation

testimage: hangs if missing debug-tweaks

PATCH In review Armin Kuster 2 participants 4 messages May 2, 2021 – May 3, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 testimage: hangs if missing debug-tweaks

The only clue is this:

WARNING: core-image-minimal-1.0-r0 do_testimage: Couldn't login into serial console as root using blank password
WARNING: core-image-minimal-1.0-r0 do_testimage: The output:
root
Login incorrect
qemux86 login:
Login timed out after 60 seconds

Poky (Yocto Project Reference Distro) 3.3+snapshot-65e75bd5d40c10509a3416026e551b7b7111c42a qemux86 /dev/ttyS1

qemux86 login: <<< run_serial(): command timed out after 120 seconds without output >>>

Hangs here....

We should issue a error and quit.

---
 meta/classes/testimage.bbclass | 4 ++++
 1 file changed, 4 insertions(+)
meta/classes/testimage.bbclass +4 -0
index 43de9d4d767..18ebbf90ec5 100644
@@ -142,6 +142,10 @@ do_testimage[depends] += "${TESTIMAGEDEPENDS}"
 do_testimage[lockfiles] += "${TESTIMAGELOCK}"
 
 def testimage_sanity(d):
+    if (bb.utils.contains("IMAGE_FEATURES", [ 'debug-tweaks'], False, True, d)):
+        bb.fatal('testimage requires a blank root password'
+                'Please check if debug-tweaks is IMAGE_FEATURES.')
+
     if (d.getVar('TEST_TARGET') == 'simpleremote'
         and (not d.getVar('TEST_TARGET_IP')
              or not d.getVar('TEST_SERVER_IP'))):
Signature · 1 line
2.25.1
#1 lore raw
Quoted 9 lines · Armin Kuster

The only clue is this:

WARNING: core-image-minimal-1.0-r0 do_testimage: Couldn't login into serial console as root using blank password
WARNING: core-image-minimal-1.0-r0 do_testimage: The output:
root
Login incorrect
qemux86 login:
Login timed out after 60 seconds

Quoted 7 lines

Poky (Yocto Project Reference Distro) 3.3+snapshot-65e75bd5d40c10509a3416026e551b7b7111c42a qemux86 /dev/ttyS1

qemux86 login: <<< run_serial(): command timed out after 120 seconds without output >>>

Hangs here....

We should issue a error and quit.

What happens if I set IMAGE_FEATURES = "empty-root-password allow-empty-password"?

Should we disable the serial monitoring if these or debug-tweaks isn't enabled? I'm surprised it causes the image to hang, it should just trigger the warning but continue to work...

Cheers,

Richard

Quoted 25 lines

---
 meta/classes/testimage.bbclass | 4 ++++

 1 file changed, 4 insertions(+)
meta/classes/testimage.bbclass +0 -0
index 43de9d4d767..18ebbf90ec5 100644
@@ -142,6 +142,10 @@ do_testimage[depends] += "${TESTIMAGEDEPENDS}"

 do_testimage[lockfiles] += "${TESTIMAGELOCK}"

 def testimage_sanity(d):

meta/classes/testimage.bbclass +4 -0
+    if (bb.utils.contains("IMAGE_FEATURES", [ 'debug-tweaks'], False, True, d)):
+        bb.fatal('testimage requires a blank root password'
+                'Please check if debug-tweaks is IMAGE_FEATURES.')
+

     if (d.getVar('TEST_TARGET') == 'simpleremote' and (not d.getVar('TEST_TARGET_IP') or not d.getVar('TEST_SERVER_IP'))):

#2 lore raw
Quoted 10 lines · Richard Purdie
Quoted 9 lines · Armin Kuster

The only clue is this:

WARNING: core-image-minimal-1.0-r0 do_testimage: Couldn't login into serial console as root using blank password
WARNING: core-image-minimal-1.0-r0 do_testimage: The output:
root
Login incorrect
qemux86 login:
Login timed out after 60 seconds

Quoted 8 lines
Quoted 7 lines

Poky (Yocto Project Reference Distro) 3.3+snapshot-65e75bd5d40c10509a3416026e551b7b7111c42a qemux86 /dev/ttyS1

qemux86 login: <<< run_serial(): command timed out after 120 seconds without output >>>

Hangs here....

We should issue a error and quit.

What happens if I set IMAGE_FEATURES = "empty-root-password allow-empty-password"?

Do you expect folks to use undocumented internal only settings? (Just added them)

Quoted 3 lines

Should we disable the serial monitoring if these or debug-tweaks isn't enabled?

Will look into it.

Quoted 2 lines

I'm surprised it causes the image to hang, it should just trigger the warning but continue to work...

WARNING: core-image-minimal-1.0-r0 do_testimage: Couldn't login into serial console as root using blank password
WARNING: core-image-minimal-1.0-r0 do_testimage: The output:
root
Login incorrect
qemux86 login:
Login timed out after 60 seconds

Poky (Yocto Project Reference Distro) 3.3+snapshot-65e75bd5d40c10509a3416026e551b7b7111c42a qemux86 /dev/ttyS1

qemux86 login: <<< run_serial(): command timed out after 120 seconds without output >>>

Currently  1 running tasks (732 of 732)  99% |#################################################### |
0: core-image-minimal-1.0-r0 do_testimage - 10m15s (pid 879458) <<<<--- how long should one wait???

TEST_SUITES = "ssh scp ping"

not testing much.

- Armin

Quoted 31 lines

Cheers,

Richard

Quoted 25 lines

---
 meta/classes/testimage.bbclass | 4 ++++

 1 file changed, 4 insertions(+)
meta/classes/testimage.bbclass +0 -0
index 43de9d4d767..18ebbf90ec5 100644
@@ -142,6 +142,10 @@ do_testimage[depends] += "${TESTIMAGEDEPENDS}"

 do_testimage[lockfiles] += "${TESTIMAGELOCK}"

 def testimage_sanity(d):

meta/classes/testimage.bbclass +4 -0
+    if (bb.utils.contains("IMAGE_FEATURES", [ 'debug-tweaks'], False, True, d)):
+        bb.fatal('testimage requires a blank root password'
+                'Please check if debug-tweaks is IMAGE_FEATURES.')
+

     if (d.getVar('TEST_TARGET') == 'simpleremote' and (not d.getVar('TEST_TARGET_IP') or not d.getVar('TEST_SERVER_IP'))):

#3 lore raw
Quoted 14 lines · On Sun, 2021-05-02 at 23:24 -0700, akuster808 wrote:
Quoted 12 lines · Richard Purdie
Quoted 11 lines · Armin Kuster

The only clue is this:

WARNING: core-image-minimal-1.0-r0 do_testimage: Couldn't login into serial console as root using blank password
WARNING: core-image-minimal-1.0-r0 do_testimage: The output:
root
Login incorrect
qemux86 login:
Login timed out after 60 seconds

Poky (Yocto Project Reference Distro) 3.3+snapshot-65e75bd5d40c10509a3416026e551b7b7111c42a qemux86 /dev/ttyS1

Quoted 8 lines
Quoted 6 lines
Quoted 5 lines

qemux86 login: <<< run_serial(): command timed out after 120 seconds without output >>>

Hangs here....

We should issue a error and quit.

What happens if I set IMAGE_FEATURES = "empty-root-password allow-empty-password"?

Do you expect folks to use undocumented internal only settings? (Just added them)

They may be undocumented but we should fix that. We're meant to be replacing debug-tweaks with more explicit options.

Quoted 3 lines
Quoted 2 lines

Should we disable the serial monitoring if these or debug-tweaks isn't enabled?

Will look into it.

Thanks, I think that would be the better fix here.

Quoted 17 lines
Quoted 2 lines

I'm surprised it causes the image to hang, it should just trigger the warning but continue to work...

WARNING: core-image-minimal-1.0-r0 do_testimage: Couldn't login into serial console as root using blank password
WARNING: core-image-minimal-1.0-r0 do_testimage: The output:
root
Login incorrect
qemux86 login:
Login timed out after 60 seconds

Poky (Yocto Project Reference Distro) 3.3+snapshot-65e75bd5d40c10509a3416026e551b7b7111c42a qemux86 /dev/ttyS1

qemux86 login: <<< run_serial(): command timed out after 120 seconds without output >>>

Quoted 8 lines

Currently  1 running tasks (732 of 732)  99%

Quoted 1 line

#################################################### |

0: core-image-minimal-1.0-r0 do_testimage - 10m15s (pid 879458) <<<<--- how long should one wait???

TEST_SUITES = "ssh scp ping"

not testing much.

That shouldn't happen and we should look into it, worth a bug if you don't plan to...

Cheers,

Richard