From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Edgar Bonet <bonet@grenoble.cnrs.fr>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] support/testing/infra/emulator.py: prevent the commands from wrapping
Date: Wed, 6 Oct 2021 21:47:10 +0200 [thread overview]
Message-ID: <20211006194710.GE2081069@scaer> (raw)
In-Reply-To: <3252ce60-6391-03d2-9dd4-01238e2f2b0d@grenoble.cnrs.fr>
Edgar, All,
On 2021-10-06 12:22 +0200, Edgar Bonet spake thusly:
> About testing this patch, Thomas Petazzoni wrote:
> > ./support/testing/tests/package/test_python_flask_expects_json.py
> I tried to run this test but ran into an unexpected issue. The test
> issues commands like
> curl -s -o /dev/null -w "%%{http_code}\\n" -X POST ...
> and then curl outputs "%{http_code}" literally. The test fails with
> AssertionError: '%{http_code}' != '200'
I can confirm that the test is currently broken for me too...
> It looks like curl simply replaced "%%" with "%", which is consistent
> with `man curl'. I replaced %%" with "%" in
> test_python_flask_expects_json.py and then got the expected behavior:
>
> 1. With no changes to master other than the above mentioned 's/%%/%/',
> the test succeeds.
>
> 2. If, in addition to this change, I replace output[-1] with output[0],
> the test fails with
>
> AssertionError: '' != '200'
>
> Why did it get an empty line? For some reason the command line got
> cut with the sequence CR,CR,CR,LF (yes, 3 CRs in a row). I guess the
> host tty driver may be adding its own CRs, as every CR,LF sequence in
> the output log had another CR right before it.
>
> 3. If, in addition to these two changes, I add the patch discussed here,
> the test succeeds again.
>
> I would say the `stty columns 29999' fix is now confirmed to work.
Agreed, it works as expected.
Since the test is already broken before this patch, I'll apply you
change, and we can fix the test case in a subsequent patch.
Thanks!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2021-10-06 19:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 17:17 [Buildroot] [PATCH 1/1] support/testing/infra/emulator.py: prevent the commands from wrapping Edgar Bonet
2021-10-05 20:01 ` Yann E. MORIN
2021-10-06 7:11 ` Thomas Petazzoni
2021-10-06 10:22 ` Edgar Bonet
2021-10-06 19:47 ` Yann E. MORIN [this message]
2021-10-06 19:56 ` Yann E. MORIN
2021-10-09 11:28 ` Peter Korsgaard
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=20211006194710.GE2081069@scaer \
--to=yann.morin.1998@free.fr \
--cc=bonet@grenoble.cnrs.fr \
--cc=buildroot@buildroot.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox