On Fri Oct 2, 2026 at 10:22 AM CEST, Jaipaul Cheernam wrote:
>
> On 2026-10-01 19:31, Mathieu Dubois-Briand via lists.openembedded.org wrote:
> I think we need to skip newly added test case in above commit like we 
> did for test_write_read_limited_history in recipe.
>
> # Also fails with editline instead of readline. See:
> # https://github.com/python/cpython/issues/123018
> SKIPPED_TESTS += " \
>      --ignore test_write_read_limited_history \
> "
>

I'm not sure. I tried to compare a build with and without musl, and
history looks broken on musl builds.

So I use the same steps as in the test:

>>> import readline
>>> readline.clear_history()
>>> readline.add_history("first line")
>>> readline.add_history("second line")
>>> readline.write_history_file("/hist")
>>> readline.add_history("third line")
>>> readline.set_history_length(2)
>>> readline.append_history_file(1, "/hist")
>>> readline.clear_history()
>>> readline.read_history_file("/hist")
>>> self.assertEqual(readline.get_history_item(1), "second line")

On the glibc build, I have:
root@qemux86-64:~# cat /hist 
_HiStOrY_V2_
second\040line
third\040line

While on the musl build, I have:
root@qemux86-64:~# cat /hist
_HiStOrY_V2_
_HiStOrY_V2_
third\040line

Now it's funny, as both build are using editline, but the behaviour is
different. It might be that the issue is not just in python.

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#247118): 
https://lists.openembedded.org/g/openembedded-core/message/247118
Mute This Topic: https://lists.openembedded.org/mt/121522858/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to