Skip to content

VerifyInstalledTermInfosParse fails for (upcoming) Fedora 38 #82026

Description

@tmds

This test fails as:

System.InvalidOperationException: System.InvalidOperationException : The terminfo database is invalid.
at System.TermInfo.DatabaseFactory.ReadDatabase(String term, String directoryPath) in /home/tester/runtime/src/libraries/System.Console/src/System/TermInfo.DatabaseFactory.cs:line 114
at System.TermInfo.DatabaseFactory.ReadDatabase(String term) in /home/tester/runtime/src/libraries/System.Console/src/System/TermInfo.DatabaseFactory.cs:line 59
at TermInfoTests.VerifyInstalledTermInfosParse() in /home/tester/runtime/src/libraries/System.Console/tests/TermInfo.Unix.cs:line 29
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) in /home/tester/runtime/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs:line 69

I've extended the test a bit, changes are in #82025.

Then it fails with more information:

 Error Message:
System.AggregateException : One or more errors occurred. (Exception while verifying '/usr/share/terminfo/x/xterm-direct256') (Exception while verifying '/usr/share/terminfo/x/xterm-16color')
---- System.Exception : Exception while verifying '/usr/share/terminfo/x/xterm-direct256'
-------- System.InvalidOperationException : The terminfo database is invalid.
---- System.Exception : Exception while verifying '/usr/share/terminfo/x/xterm-16color'
-------- System.InvalidOperationException : The terminfo database is invalid.
Stack Trace:
at TermInfoTests.VerifyInstalledTermInfosParse() in /root/repos/runtime/src/libraries/System.Console/tests/TermInfo.Unix.cs:line 64
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) in /root/repos/runtime/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs:line 59
----- Inner Stack Trace #1 (System.Exception) -----
----- Inner Stack Trace -----
at System.TermInfo.DatabaseFactory.ReadDatabase(String term, String directoryPath) in /root/repos/runtime/src/libraries/System.Console/src/System/TermInfo.DatabaseFactory.cs:line 126
at TermInfoTests.VerifyInstalledTermInfosParse() in /root/repos/runtime/src/libraries/System.Console/tests/TermInfo.Unix.cs:line 38
----- Inner Stack Trace #2 (System.Exception) -----
----- Inner Stack Trace -----
at System.TermInfo.DatabaseFactory.ReadDatabase(String term, String directoryPath) in /root/repos/runtime/src/libraries/System.Console/src/System/TermInfo.DatabaseFactory.cs:line 126
at TermInfoTests.VerifyInstalledTermInfosParse() in /root/repos/runtime/src/libraries/System.Console/tests/TermInfo.Unix.cs:line 38

For bothxterm-16color and xterm-direct256, the test fails at:

constintMaxTermInfoLength=4096;// according to the term and tic man pages, 4096 is the terminfo file size max
constintHeaderLength=12;
if(termInfoLength<=HeaderLength||termInfoLength>MaxTermInfoLength)
{
thrownewInvalidOperationException(SR.IO_TermInfoInvalid);
}

These files exceed the allowed length:

ls -l /usr/share/terminfo/x/xterm-direct256 /usr/share/terminfo/x/xterm-16color
-rw-r--r--. 1 root root 4185 Jan 19 00:00 /usr/share/terminfo/x/xterm-16color
-rw-r--r--. 1 root root 4126 Jan 19 00:00 /usr/share/terminfo/x/xterm-direct256

@adamsitnik can we increase the allowed length, or drop the max length check? Or do you think there is an issue with these files?

cc @omajid

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions