All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander Kanavin" <alex.kanavin@gmail.com>
To: Vinay Kumar <vinay.m.engg@gmail.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>,
	 Richard Purdie <richard.purdie@linuxfoundation.org>,
	 Konrad Weihmann <kweihmann@outlook.com>,
	Randy MacLeod <rwmacleod@gmail.com>,
	 umesh kalappa0 <umesh.kalappa0@gmail.com>,
	vinay.kumar@blackfigtech.com
Subject: Re: [OE-core] [PATCH v2 6/7] oeqa/selftest/cases/rust.py: Rust oe-selftest script.
Date: Thu, 20 May 2021 22:30:37 +0200	[thread overview]
Message-ID: <CANNYZj-yODhEEFErtUxBeiw3O1YvEfV-hGOOW_uPNvo6x8mNYQ@mail.gmail.com> (raw)
In-Reply-To: <CANNYZj88moczJGrTH_s3DAvR5P21aGui-yPfPst3mgySEcDj3A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 7308 bytes --]

If you publish the code to a branch, and show exactly the errors you get, I
could try to look at it.

Alex

On Thu, 20 May 2021 at 22:29, Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> You cannot hardcode the ip address like that; it's set dynamically when
> qemu starts, and you can only access it from selftest or runtime test.
>
> Alex
>
> On Thu, 20 May 2021 at 12:06, Vinay Kumar <vinay.m.engg@gmail.com> wrote:
>
>> Hi Alex,
>>
>> Tried your suggestions to copy and run in rust.py without any issue as
>> below.
>> ===============================
>> builddir = get_bb_var("B", "rust-testsuite")
>> ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user="root",
>> timeout=600)
>> ssh.copy_to(builddir + "/" +
>> "build/x86_64-unknown-linux-gnu/stage2-tools-bin/remote-test-server","~/")
>> t_thread = threading.Thread(target=ssh.run,
>> args=("~/remote-test-server -v remote",))
>> t_thread.start()
>> ===============================
>>
>> If we set "TEST_DEVICE_ADDR" in rust.py through "runCmd" as shown
>> below,  the remote-test-client does not connect  to the image.
>> So a lot of tests fail.
>> ===============================
>> "cmd  = "export TEST_DEVICE_ADDR=%s:12345;" % qemu.ip"
>> runCmd(cmd)
>> bitbake("{} -c check".format(recipe))
>> ===============================
>>
>> Also, I tried to move do_check content to rust.py without any success.
>> ===============================
>> cmd = "export PATH=%s/../recipe-sysroot-native/usr/lib/rustlib/:" %
>> builddir
>> cmd= cmd + "%s/../recipe-sysroot-native/usr/bin:$PATH;" % builddir
>> cmd = cmd + "export
>> RUST_TARGET_PATH=%s/../recipe-sysroot-native/usr/lib/rustlib/;" %
>> builddir
>> cmd = cmd + "cd " + builddir + ";"
>> cmd  = "export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip
>> cmd = cmd + "python3 src/bootstrap/bootstrap.py -j 40 --verbose test
>> --no-fail-fast --bless --target aarch64-poky-linux > summary.txt 2>&1"
>>
>> Error:
>> File
>> "/ala-lpggp31/vinay/review-2/poky-contrib/meta/lib/oeqa/utils/commands.py",
>> line 210, in runCmd
>> raise AssertionError("Command '%s' returned non-zero exit status
>> %d:\n%s" % (command, result.status, exc_output))
>> AssertionError: Command 'export
>> TEST_DEVICE_ADDR="192.168.7.2:12345";python3
>> src/bootstrap/bootstrap.py -j 40 --verbose test --no-fail-fast --bless
>> --target aarch64-poky-linux > summary.txt 2>&1' returned non-zero exit
>> status 2:
>> ===============================
>>
>> So in rust.py only copy and execution of "remote-test-server" is taken
>> care of.
>> And the test execution is by  do_check of rust-testsuite.inc as below,
>> ===============================
>> do_check () {
>>     export TEST_DEVICE_ADDR="192.168.7.2:12345"
>>     rust_runx test --no-fail-fast --bless --target "${TARGET_SYS}" >
>> summary.txt 2> /dev/null
>> }
>>
>> Let me know if this ok. will send patches with changes for review.
>>
>> Regards,
>> Vinay
>>
>> On Mon, May 17, 2021 at 8:57 PM Vinay Kumar via lists.openembedded.org
>> <vinay.m.engg=gmail.com@lists.openembedded.org> wrote:
>> >
>> > Hi Alex,
>> >
>> > Tried testing outside oe-selftest framework, it works fine without any
>> errors,
>> >
>> > export TEST_DEVICE_ADDR="192.168.7.4:12345"
>> > rust_runx test --no-fail-fast --bless --target "aarch64-poky-linux" >
>> > summary.txt 2> /dev/null
>> >
>> > Also, log (summary.txt) shows "remote-test-client" is connecting to
>> > the image without any issue.
>> > =======================================
>> > running:
>> "/ala-lpggp31/vinay/review-2/b1/tmp/work/cortexa57-poky-linux/rust-testsuite/1.46.0-r0/rustc-1.46.0-src/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client"
>> > "spawn-emulator" "aarch64-poky-linux"
>> >
>> "/ala-lpggp31/vinay/review-2/b1/tmp/work/cortexa57-poky-linux/rust-testsuite/1.46.0-r0/rustc-1.46.0-src/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-server"
>> >
>> "/ala-lpggp31/vinay/review-2/b1/tmp/work/cortexa57-poky-linux/rust-testsuite/1.46.0-r0/rustc-1.46.0-src/build/tmp"
>> > Connecting to remote device 192.168.7.4:12345 ...
>> >
>> > Will integrate these changes in oe-selftest and let you know.
>> >
>> > Regards,
>> > Vinay
>> >
>> > On Mon, May 17, 2021 at 8:11 PM Vinay Kumar <vinay.m.engg@gmail.com>
>> wrote:
>> > >
>> > > Checking suggestions, the booted image with tap seems to be working by
>> > > passing "-monitor  telnet:127.0.0.1:1234,server,nowait"
>> > > so I will execute testing and update you.
>> > > ==========================
>> > > root@qemuarm64:~# ifconfig
>> > > eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:02
>> > >           inet addr:192.168.7.4  Bcast:192.168.7.255
>> Mask:255.255.255.0
>> > >           inet6 addr: fe80::5054:ff:fe12:3402/64 Scope:Link
>> > >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>> > >           RX packets:116 errors:0 dropped:0 overruns:0 frame:0
>> > >           TX packets:98 errors:0 dropped:0 overruns:0 carrier:0
>> > >           collisions:0 txqueuelen:1000
>> > >           RX bytes:945121 (922.9 KiB)  TX bytes:9529 (9.3 KiB)
>> > >
>> > > root@qemuarm64:~# ./remote-test-server -v remote
>> > > starting test server
>> > > listening on 0.0.0.0:12345!
>> > > ==========================
>> > >
>> > > Regards,
>> > > Vinay
>> > >
>> > > On Mon, May 17, 2021 at 8:02 PM Alexander Kanavin
>> > > <alex.kanavin@gmail.com> wrote:
>> > > >
>> > > > Thanks, can you please look into the error? The line where it
>> happens and the way to get a backtrace is right there :)
>> > > > There's no reason it shouldn't work.
>> > > >
>> > > > Alex
>> > > >
>> > > > On Mon, 17 May 2021 at 15:21, Vinay Kumar <vinay.m.engg@gmail.com>
>> wrote:
>> > > >>
>> > > >> Hi Alex,
>> > > >>
>> > > >> Error on qemu  image (ex. Aarch64) booted with tap interface.
>> > > >> ===========================
>> > > >> root@qemuarm64:~# ./remote-test-server
>> > > >> starting test server
>> > > >> thread 'main' panicked at 'TcpListener::bind(bind_addr) failed with
>> > > >> Cannot assign requested address (os error 99)',
>> > > >> src/tools/remote-test-server/src/main.rs:90:20
>> > > >> note: run with `RUST_BACKTRACE=1` environment variable to display
>> a backtrace
>> > > >> ===========================
>> > > >>
>> > > >> On Mon, May 17, 2021 at 5:16 PM Alexander Kanavin
>> > > >> <alex.kanavin@gmail.com> wrote:
>> > > >> >
>> > > >> > On Mon, 17 May 2021 at 13:34, Vinay Kumar <
>> vinay.m.engg@gmail.com> wrote:
>> > > >> >>
>> > > >> >> "remote-test-server" on qemu-image with a tap interface throws
>> an error.
>> > > >> >> The emulators for rust testing are with tcp port forwarding so
>> used
>> > > >> >> slirp method with added rust port.
>> > > >> >
>> > > >> >
>> > > >> > I'm not sure I understand - what kind of error? In both cases
>> the server starts listening on a port, so in slirp scenario the address is
>> 127.0.0.1:12345 (prone to breakage if something else on the build host
>> took that port btw, including another instance of the same test), in tap it
>> would be 192.168.7.2:12345. For the client you simply supply that via
>> TEST_DEVICE_ADDR. No?
>> > > >> >
>> > > >> > Alex
>> >
>> > 
>> >
>>
>

[-- Attachment #2: Type: text/html, Size: 10203 bytes --]

  reply	other threads:[~2021-05-20 20:30 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 11:59 [PATCH] Rust cross testing integration with oe-selftest Vinay Kumar
2021-04-10  9:50 ` [OE-core] " Alexander Kanavin
2021-04-15  9:32   ` [PATCH 1/8] We copied rust.inc to rust-test.inc file, since the rust.inc generates the rquired wrappers (which contains target compiler paths) in place. Which we can use in config.toml file for cross testing. We are trying to generate the config.toml through do_configure option in rust-test.inc file Vinay Kumar
2021-04-15  9:32     ` [PATCH 2/8] The function "do_compile" is to compile remote-test-server, and "do_check" to trigger the rust testing Vinay Kumar
2021-04-15  9:32     ` [PATCH 3/8] The rust.py is oe-selftest script to build remote-test-server, qemu-image and boot image in slirp mode. Once the image gets booted throgh "check" the testing starts by copying the "remote-test-server" in to the image Vinay Kumar
2021-04-15  9:32     ` [PATCH 4/8] In rust testing we have to boot image in slirp mode along with qemu monitor via telnet. Also, we are passing "-serial mon:stdio -serial" to fix runtime errors like, "failed with Connection reset by peer" observed during execution on image Vinay Kumar
2021-04-15  9:32     ` [PATCH 5/8] There are some error messages like, "error: linker `cc` not found" got fixed by adding "cc" in hosttools Vinay Kumar
2021-04-15  9:52       ` [OE-core] " Konrad Weihmann
2021-04-15 22:17       ` Richard Purdie
2021-05-17 10:35         ` [PATCH v2 1/7] rust-testsuite.inc : Rust cross testing Vinay Kumar
2021-05-17 10:35           ` [PATCH v2 2/7] Add rust testsuite for 1.46.0 Vinay Kumar
2021-05-17 10:35           ` [PATCH v2 3/7] rust.inc : Changed target cpu for powerpc to "7400" Vinay Kumar
2021-05-17 10:35           ` [PATCH v2 4/7] runqemu: Add hostfwd for rust testing Vinay Kumar
2021-05-17 10:56             ` Alexander Kanavin
2021-05-17 10:35           ` [PATCH v2 5/7] oeqa/utils/qemurunner.py: Enable self.use_slirp Vinay Kumar
2021-05-17 10:45             ` Konrad Weihmann
2021-05-17 10:35           ` [PATCH v2 6/7] oeqa/selftest/cases/rust.py: Rust oe-selftest script Vinay Kumar
2021-05-17 11:00             ` Alexander Kanavin
2021-05-17 11:34               ` Vinay Kumar
2021-05-17 11:46                 ` Alexander Kanavin
2021-05-17 13:20                   ` Vinay Kumar
2021-05-17 14:32                     ` Alexander Kanavin
2021-05-17 14:41                       ` Vinay Kumar
2021-05-17 15:27                         ` Vinay Kumar
     [not found]                         ` <167FE427910432AF.29970@lists.openembedded.org>
2021-05-20 10:06                           ` [OE-core] " Vinay Kumar
2021-05-20 20:29                             ` Alexander Kanavin
2021-05-20 20:30                               ` Alexander Kanavin [this message]
2021-05-21 13:29                                 ` [PATCH v3 1/5] rust-testsuite.inc : Rust cross testing Vinay Kumar
2021-05-21 13:29                                   ` [PATCH v3 2/5] Add rust testsuite for 1.46.0 Vinay Kumar
2021-05-21 13:29                                   ` [PATCH v3 3/5] rust.inc : Changed target cpu for powerpc to "7400" Vinay Kumar
2021-05-21 13:29                                   ` [PATCH v3 4/5] oeqa/selftest/cases/rust.py: Rust oe-selftest script Vinay Kumar
2021-05-22 16:34                                     ` Alexander Kanavin
2021-05-24  5:12                                       ` Vinay Kumar
2021-05-24 17:15                                       ` [PATCH v4 1/5] rust-testsuite.inc : Rust cross testing Vinay Kumar
2021-05-24 17:15                                         ` [PATCH v4 2/5] Add rust testsuite for 1.46.0 Vinay Kumar
2021-05-24 17:15                                         ` [PATCH v4 3/5] rust.inc : Changed target cpu for powerpc to "7400" Vinay Kumar
2021-05-24 17:15                                         ` [PATCH v4 4/5] oeqa/selftest/cases/rust.py: Rust oe-selftest script Vinay Kumar
2021-05-24 19:59                                           ` Alexander Kanavin
2021-05-26 20:43                                             ` Vinay Kumar
2021-05-27  8:10                                               ` [PATCH v5 1/5] rust-testsuite.inc : Rust cross testing Vinay Kumar
2021-05-27  8:10                                                 ` [PATCH v5 2/5] Add rust testsuite for 1.46.0 Vinay Kumar
2021-05-27  8:10                                                 ` [PATCH v5 3/5] rust.inc : Changed target cpu for powerpc to "7400" Vinay Kumar
2021-05-27  8:10                                                 ` [PATCH v5 4/5] oeqa/selftest/cases/rust.py: Rust oe-selftest script Vinay Kumar
2021-05-27  8:32                                                   ` Alexander Kanavin
     [not found]                                                   ` <1682DF4C7F380F13.5334@lists.openembedded.org>
2021-05-27  9:31                                                     ` [OE-core] " Alexander Kanavin
2021-05-27 12:03                                                   ` Alexander Kanavin
2021-05-27 12:18                                                     ` Vinay Kumar
2021-05-27 13:35                                                       ` Alexander Kanavin
2021-05-28 15:53                                                         ` [PATCH v6 1/5] rust-testsuite.inc : Rust cross testing Vinay Kumar
2021-05-28 15:53                                                           ` [PATCH v6 2/5] Add rust testsuite for 1.46.0 Vinay Kumar
2021-05-28 15:53                                                           ` [PATCH v6 3/5] rust.inc : Changed target cpu for powerpc to "7400" Vinay Kumar
2021-05-28 15:53                                                           ` [PATCH v6 4/5] oeqa/selftest/cases/rust.py: Rust oe-selftest script Vinay Kumar
2021-05-28 15:53                                                           ` [PATCH v6 5/5] rust.inc : Fix for aarch64 feature Vinay Kumar
2021-05-28 16:09                                                         ` [PATCH v7 1/5] rust-testsuite.inc : Rust cross testing Vinay Kumar
2021-05-28 16:09                                                           ` [PATCH v7 2/5] rust-testsuite_1.46.0.bb Vinay Kumar
2021-05-28 16:09                                                           ` [PATCH v7 3/5] rust.inc : Changed target cpu for powerpc to "7400" Vinay Kumar
2021-05-28 16:09                                                           ` [PATCH v7 4/5] oeqa/selftest/cases/rust.py: Rust oe-selftest script Vinay Kumar
2021-05-28 16:09                                                           ` [PATCH v7 5/5] rust.inc : Fix for aarch64 feature Vinay Kumar
2021-05-28 16:13                                                         ` [PATCH v5 4/5] oeqa/selftest/cases/rust.py: Rust oe-selftest script Vinay Kumar
2021-05-28 21:10                                                           ` Alexander Kanavin
2021-05-29  9:18                                                             ` Vinay Kumar
2021-05-29  9:49                                                               ` Alexander Kanavin
2021-05-29 10:57                                                                 ` [PATCH v8 1/5] rust-testsuite.inc : Rust cross testing Vinay Kumar
2021-05-29 10:57                                                                   ` [PATCH v8 2/5] Add rust testsuite for 1.46.0 Vinay Kumar
2021-05-29 10:57                                                                   ` [PATCH v8 3/5] rust.inc : Changed target cpu for powerpc to "7400" Vinay Kumar
2021-05-29 10:57                                                                   ` [PATCH v8 4/5] oeqa/selftest/cases/rust.py: Rust oe-selftest script Vinay Kumar
2021-05-29 10:57                                                                   ` [PATCH v8 5/5] While executing ui testing observed failures due to below warning, Vinay Kumar
2021-05-29 11:14                                                                 ` [PATCH v5 4/5] oeqa/selftest/cases/rust.py: Rust oe-selftest script Vinay Kumar
2021-05-27  8:11                                                 ` [PATCH v5 5/5] rust.inc : Fix for aarch64 feature Vinay Kumar
2021-05-27  8:18                                               ` [PATCH v4 4/5] oeqa/selftest/cases/rust.py: Rust oe-selftest script Vinay Kumar
2021-05-24 17:15                                         ` [PATCH v4 5/5] rust.inc : Fix for aarch64 feature Vinay Kumar
     [not found]                                       ` <1681E8AC31CF1367.29978@lists.openembedded.org>
2021-05-24 17:25                                         ` [OE-core] [PATCH v3 4/5] oeqa/selftest/cases/rust.py: Rust oe-selftest script Vinay Kumar
2021-05-21 13:29                                   ` [PATCH v3 5/5] rust.inc : Fix for aarch64 feature Vinay Kumar
2021-05-22 16:11                                   ` [PATCH v3 1/5] rust-testsuite.inc : Rust cross testing Alexander Kanavin
2021-05-22 16:15                                     ` Alexander Kanavin
2021-05-21 13:46                                 ` [OE-core] [PATCH v2 6/7] oeqa/selftest/cases/rust.py: Rust oe-selftest script Vinay Kumar
2021-05-22 16:29                                   ` Alexander Kanavin
2021-05-17 10:35           ` [PATCH v2 7/7] rust.inc : Fix for aarch64 feature Vinay Kumar
2021-05-17 10:56           ` [PATCH v2 1/7] rust-testsuite.inc : Rust cross testing Alexander Kanavin
2021-05-17 11:04             ` Vinay Kumar
2021-05-17 11:05           ` Alexander Kanavin
2021-05-17 11:20             ` Vinay Kumar
2021-05-17 11:41               ` Alexander Kanavin
2021-05-17 22:18           ` [OE-core] " Khem Raj
2021-05-20 11:24             ` Vinay Kumar
2021-05-17 10:41         ` [OE-core] [PATCH 5/8] There are some error messages like, "error: linker `cc` not found" got fixed by adding "cc" in hosttools Vinay Kumar
2021-04-15  9:32     ` [PATCH 6/8] We are passing "hostfwd=tcp::12345-:12345" while booting image when slirp is selected. Also, we are using mapped port of ssh :22 to copy remote-test-server to image. We have added a logic to extract the port number whenever multiple instaces of qemu are running (ex., 2222 gets incremented by 1 if its already in use by another qemu) Vinay Kumar
2021-04-15  9:32     ` [PATCH 7/8] These changes are to get the rust target triplet "mips64-unknown-linux-gnuabi64" for mips64 Vinay Kumar
2021-04-15  9:32     ` [PATCH 8/8] In case of testing for "x86_64" Vinay Kumar
2021-04-15 14:30   ` [OE-core] [PATCH] Rust cross testing integration with oe-selftest Vinay Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANNYZj-yODhEEFErtUxBeiw3O1YvEfV-hGOOW_uPNvo6x8mNYQ@mail.gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=kweihmann@outlook.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=rwmacleod@gmail.com \
    --cc=umesh.kalappa0@gmail.com \
    --cc=vinay.kumar@blackfigtech.com \
    --cc=vinay.m.engg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.