|
Message-ID: <ZhgvaB1T7T9IGYgT@voyager> Date: Thu, 11 Apr 2024 20:43:52 +0200 From: Markus Wichmann <nullplan@....net> To: musl@...ts.openwall.com Subject: Re: Re: [PATCH] iconv: Add check null-check for scd pointer Am Thu, Apr 11, 2024 at 08:56:56PM +0300 schrieb Maks Mishin: > Rich, I'm sorry, but it's now always possible to test a particular function. > Can you tell me how you are testing the library? > This will help me make more meaningful patches. You write tests and link them against musl, and then execute them. The most comprehensive test suite is probably libc-test (http://nsz.repo.hu/git/?p=libc-test), but for this it would have been overkill. In case of something like iconv(), I would probably create a utility similar to iconv(1), link it against musl, then write a shell script with a few test cases. If you get the expected output, everything is fine. If not, you broke something. It would be harder to test something like if_nameindex(), which has a different right answer on every given machine. But iconv() does not depend on anything in the system. You just give it input charset, output charset, and an input, and it generates the same output every time, or else it is broken. Ciao, Markus
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.