bsdcpio test failure

7 views
Skip to first unread message

FileX

unread,
May 13, 2024, 10:38:44 PMMay 13
to libarchiv...@googlegroups.com
Hello,
I am stuck in building libarchive on kubuntu 23.10.
The output told me to report the test failure here, so I have attached the log files all together.
Good luck and if you need more feel free to ask.

FileX
test-suite.log
t.err
itnv.out
tv.out
tv.err
t.out
it.out
test_option_t.stdout
test_option_t.log
in.err
itnv.err
ot.err
it.err
test_option_tv.stdout
test_option_t.cpio

Tim Kientzle

unread,
May 13, 2024, 10:53:39 PMMay 13
to FileX, libarchiv...@googlegroups.com
This test is failing because the dates are being formatted as “1月 1 1970” and the test seems to be expecting “1 1 1970”. This looks like a mistake in the design of this particular test, which is either failing to fully specify the locale it expects or is failing to correctly handle output in the current locale.

As far as I can tell from the log information here, it looks like bsdcpio is actually working correctly in this particular case.

I’m surprised this hasn’t been reported earlier. What locale is your system set to use?

Tim

P.S. I suspect that this might be enough to fix this particular test; if you could try this and let me know, I would appreciate it.

diff --git a/cpio/test/test_option_t.c b/cpio/test/test_option_t.c
index 953e4a80..ef639c61 100644
--- a/cpio/test/test_option_t.c
+++ b/cpio/test/test_option_t.c
@@ -89,6 +89,7 @@ DEFINE_TEST(test_option_t)
mtime = 1;
#ifdef HAVE_LOCALE_H
setlocale(LC_ALL, "");
+ setlocale(LC_TIME, "");
#endif
#if defined(HAVE_LOCALTIME_S)
tmptr = localtime_s(&tmbuf, &mtime) ? NULL : &tmbuf;
> --
> You received this message because you are subscribed to the Google Groups "libarchive-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to libarchive-disc...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/libarchive-discuss/jGFiWJDPCfO_QUHqnxLHgjsqarlmkwoUgTwzM-8kFjC-1e3Uikk2RwzwTtXlkUkG9MBsInCiT0nqpUpdBhF5pBNKu5Cp719wcqa7Hg3JDCA%3D%40proton.me.
> <test-suite.log><test_option_t.log><in.err><itnv.err><in.out><ot.err><it.err><test_option_tv.stdout><test_option_t.cpio><t.err><itnv.out><ot.out><tv.out><tv.err><t.out><it.out><test_option_t.stdout>

Reply all
Reply to author
Forward
0 new messages