IncludeOS icon indicating copy to clipboard operation
IncludeOS copied to clipboard

test: serial incomplete

Open AndreasAakesson opened this issue 8 years ago • 6 comments

  • Missing new test system (test.py)
  • Missing README

This test does nothing. Any ideas how to make it do more than nothing?

AndreasAakesson avatar Jul 05 '16 11:07 AndreasAakesson

Needs to be connected to a pseudo terminal so we can read and write to the running service

fwsGonzo avatar Jul 05 '16 12:07 fwsGonzo

Vmrunner has control over both stdin and stdut of the process so we could implement something like vm.writeline(str) in vmrunner.py and use that.

-------- Original Message -------- Subject: Re: [hioa-cs/IncludeOS] test: serial incomplete (#659) From: Alf-André Walla To: hioa-cs/IncludeOS CC:

Needs to be connected to a pseudo terminal so we can read and write to the running service

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/hioa-cs/IncludeOS/issues/659#issuecomment-230459475, or mute the threadhttps://github.com/notifications/unsubscribe/AB-c1jZvFzSRlmojLmSCniEl3p6dwb9yks5qSkfdgaJpZM4JFA3H.

alfreb avatar Jul 05 '16 14:07 alfreb

I'm currently trying to write to qemu from python (using _proc.stdin.write() on the qemu process), but it doesn't look like the service (IncludeOS) receives any interrupts. Can someone confirm that it should indeed receive interrupts? From what I can understand, -nographic makes serial port default to stdio. Is it something I'm missing?

AndreasAakesson avatar Jul 08 '16 11:07 AndreasAakesson

After a lot of digging I got it working.

Added IRQ_manager::cpu(0).enable_irq(4); in the service and now it's working. This should be done inside Serial when subscribing? Or should this already be done in IRQ_manager::subscribe?

AndreasAakesson avatar Jul 08 '16 12:07 AndreasAakesson

Nvm, I'm wrong. It looks like writing to subprocess (qemu) stdin just echos the text back to stdout.. So I still need to find out how to write to serial port from outside qemu.

AndreasAakesson avatar Jul 08 '16 13:07 AndreasAakesson

if serial uses legacy IRQs then yes, add enable to serial constructor

fwsGonzo avatar Jul 09 '16 16:07 fwsGonzo