From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3153 Path: news.gmane.org!not-for-mail From: Timerlan Moldobaev Newsgroups: gmane.linux.lib.musl.general Subject: cluts test suite with musl Date: Tue, 23 Apr 2013 15:26:51 +0300 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c21a60cb8d5804db064c03 X-Trace: ger.gmane.org 1366720024 6525 80.91.229.3 (23 Apr 2013 12:27:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Apr 2013 12:27:04 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3157-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 23 14:27:08 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UUcJM-00089L-75 for gllmg-musl@plane.gmane.org; Tue, 23 Apr 2013 14:27:04 +0200 Original-Received: (qmail 21720 invoked by uid 550); 23 Apr 2013 12:27:03 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 21710 invoked from network); 23 Apr 2013 12:27:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=/RHHSWvms0KYcwU6kDd6n5TK1IUWpVqJu8xq7x50ens=; b=irN0LLV1o+P2Rg1AlrxpJ1jyBzSdsOLfkWvFIKMIqNw/qWAoxqowtR3LPlouP9Z+bB BVN1oBenQFPuvIN71MymZZfemuvormHsSxEtKXswNdDsewx3fKwYiw8lCY5I93XBS7gn 1u2uV+41FOrp5p5lkoqlHy0fl/E8M9bEzXAlS+A99edHg56NpYUjawG1jaZC4bvCtlLG eT/Kh7nTCiQ8Wo+h5gH+2KdUuQySAwfQTRdmP0IS7MjJDzDnxdPkSq1lcIowgNH27jsB tyPeE7BfDUH9m6ejhRT4Z5xryDZj/FXQJU6dha7N+JHur3TWWk1ZxWTAZyGeQv2EIvSO fZSw== X-Received: by 10.180.13.179 with SMTP id i19mr16738138wic.18.1366720011535; Tue, 23 Apr 2013 05:26:51 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:3153 Archived-At: --001a11c21a60cb8d5804db064c03 Content-Type: text/plain; charset=ISO-8859-1 Hi , I am trying to run cluts test suite from https://github.com/lmarcetic/cluts over the latest musl libraries. Seems that this test suite is not synchronized with musl as I am getting numerous errors. Is this test suite operational ? Is it a part of musl correct functionality checking ? Can you look at potential issues in musl discovered as a result of cluts tests running ? Thanks, Tim. --001a11c21a60cb8d5804db064c03 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi ,

Seems that this test suite is not synchronized with musl as I am= getting=A0numerous=A0errors.
Is this test suite operationa= l ?=A0
Is it a part of =A0musl correct functionality =A0che= cking ?=A0
Can you look at =A0potential issues in musl discovered as a resu= lt of cluts tests running ?

Thanks,
Tim.=A0
--001a11c21a60cb8d5804db064c03-- From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3155 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts test suite with musl Date: Tue, 23 Apr 2013 09:40:38 -0400 Message-ID: <20130423134038.GX20323@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1366724457 25509 80.91.229.3 (23 Apr 2013 13:40:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Apr 2013 13:40:57 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3159-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 23 15:40:59 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UUdSn-0006qi-AR for gllmg-musl@plane.gmane.org; Tue, 23 Apr 2013 15:40:53 +0200 Original-Received: (qmail 5160 invoked by uid 550); 23 Apr 2013 13:40:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5152 invoked from network); 23 Apr 2013 13:40:51 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3155 Archived-At: On Tue, Apr 23, 2013 at 03:26:51PM +0300, Timerlan Moldobaev wrote: > Hi , > > I am trying to run cluts test suite from > https://github.com/lmarcetic/cluts over > the latest musl libraries. > Seems that this test suite is not synchronized with musl as I am > getting numerous errors. > Is this test suite operational ? > Is it a part of musl correct functionality checking ? > Can you look at potential issues in musl discovered as a result of cluts > tests running ? I know we don't use all of cluts because some of the tests are wrong, and it has some bitrot. Maybe somebody could look into this and making an updated version that's correct or at least has the incorrect tests disabled? I'll look at it when I have enough time to spend on it. Rich From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3160 Path: news.gmane.org!not-for-mail From: Timerlan Moldobaev Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts test suite with musl Date: Tue, 23 Apr 2013 18:17:15 +0300 Message-ID: References: <20130423134038.GX20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f642b5837b46504db08aefc X-Trace: ger.gmane.org 1366730244 31492 80.91.229.3 (23 Apr 2013 15:17:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Apr 2013 15:17:24 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3164-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 23 17:17:28 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UUeyG-0002h0-6o for gllmg-musl@plane.gmane.org; Tue, 23 Apr 2013 17:17:28 +0200 Original-Received: (qmail 32642 invoked by uid 550); 23 Apr 2013 15:17:27 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32634 invoked from network); 23 Apr 2013 15:17:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=kJ0fso0Y9H/+LIK6ysec6u91P6EjRx7UrQvhIX+kOpk=; b=AbVd4N1upnw+NGDRmIxm8lRw4P6mQQemdF1zGJB/mEa/qmPHfyXQENKcXB+qiF4Cam GdC+bFivFr7a8gZvkvV5o8PvJl2MHCn/umrWujMwaP92jbNTPsiZlC5vHSv0IrHh0ipJ tex/N4OxMBAlYo6Ins3BjldX3NE6HlD6CQgnOliuDO1HpyQ5NuLfoEfKFSJ0cIyAviVP WOfnAyaoa0YF3kNp40NUP2LPVcapiouTtCCxrGIdTkz+RYVYJgGhZnlJVhYB0MLG6uIa +/vPA7CN2O7sWRN/pvtUdap23mOtOyRLrmo/NsWYmuXJeEEclaLX/aS9YZuAZjvp+zr4 irUw== X-Received: by 10.180.36.205 with SMTP id s13mr13460697wij.31.1366730235948; Tue, 23 Apr 2013 08:17:15 -0700 (PDT) In-Reply-To: <20130423134038.GX20323@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:3160 Archived-At: --e89a8f642b5837b46504db08aefc Content-Type: text/plain; charset=ISO-8859-1 Can you please specify what tests within cluts should work correctly ? There are chances that in my specific environment some musl issues might pop up even when running cluts partly. I can assist in debugging such issues (as it was for testsuite case). Thanks, Tim. On Tue, Apr 23, 2013 at 4:40 PM, Rich Felker wrote: > On Tue, Apr 23, 2013 at 03:26:51PM +0300, Timerlan Moldobaev wrote: > > Hi , > > > > I am trying to run cluts test suite from > > https://github.com/lmarcetic/cluts over > > the latest musl libraries. > > Seems that this test suite is not synchronized with musl as I am > > getting numerous errors. > > Is this test suite operational ? > > Is it a part of musl correct functionality checking ? > > Can you look at potential issues in musl discovered as a result of cluts > > tests running ? > > I know we don't use all of cluts because some of the tests are wrong, > and it has some bitrot. Maybe somebody could look into this and making > an updated version that's correct or at least has the incorrect tests > disabled? I'll look at it when I have enough time to spend on it. > > Rich > --e89a8f642b5837b46504db08aefc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Can you please specify what =A0tests within clu= ts =A0should =A0work=A0correctly=A0?
There are chances that= in my specific environment some musl issues might pop up even when running= cluts partly. =A0
I can assist in debugging such issues (as it was for testsuite c= ase).

Thanks,
Tim.=A0<= /div>


On= Tue, Apr 23, 2013 at 4:40 PM, Rich Felker <dalias@aerifal.cx> wrote:
On T= ue, Apr 23, 2013 at 03:26:51PM +0300, Timerlan Moldobaev wrote:
> Hi ,
>
> I am trying to run cluts test suite from
> https= ://github.com/lmarcetic/cluts over
> the latest musl libraries.
> Seems that this test suite is not synchronized with musl as I am
> getting numerous errors.
> Is this test suite operational ?
> Is it a part of =A0musl correct functionality =A0checking ?
> Can you look at =A0potential issues in musl discovered as a result of = cluts
> tests running ?

I know we don't use all of cluts because some of the tests = are wrong,
and it has some bitrot. Maybe somebody could look into this and making
an updated version that's correct or at least has the incorrect tests disabled? I'll look at it when I have enough time to spend on it.

Rich

--e89a8f642b5837b46504db08aefc-- From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3161 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts test suite with musl Date: Tue, 23 Apr 2013 11:31:27 -0400 Message-ID: <20130423153127.GA20323@brightrain.aerifal.cx> References: <20130423134038.GX20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1366731098 9694 80.91.229.3 (23 Apr 2013 15:31:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Apr 2013 15:31:38 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3165-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 23 17:31:42 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UUfC1-0000tq-Hd for gllmg-musl@plane.gmane.org; Tue, 23 Apr 2013 17:31:41 +0200 Original-Received: (qmail 9425 invoked by uid 550); 23 Apr 2013 15:31:40 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 9410 invoked from network); 23 Apr 2013 15:31:39 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3161 Archived-At: On Tue, Apr 23, 2013 at 06:17:15PM +0300, Timerlan Moldobaev wrote: > Can you please specify what tests within cluts should work correctly ? > There are chances that in my specific environment some musl issues might > pop up even when running cluts partly. > I can assist in debugging such issues (as it was for testsuite case). Yes, I'm actually working on a patch right now that disables the incorrect tests and fixes up some other issues. Rich From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3162 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts test suite with musl Date: Tue, 23 Apr 2013 11:47:05 -0400 Message-ID: <20130423154705.GB20323@brightrain.aerifal.cx> References: <20130423134038.GX20323@brightrain.aerifal.cx> <20130423153127.GA20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="qVyHzDF4yf4A8jkR" Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1366732035 20685 80.91.229.3 (23 Apr 2013 15:47:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Apr 2013 15:47:15 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3166-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 23 17:47:20 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UUfR9-0000hU-0Y for gllmg-musl@plane.gmane.org; Tue, 23 Apr 2013 17:47:19 +0200 Original-Received: (qmail 19596 invoked by uid 550); 23 Apr 2013 15:47:17 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 19586 invoked from network); 23 Apr 2013 15:47:17 -0000 Content-Disposition: inline In-Reply-To: <20130423153127.GA20323@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3162 Archived-At: --qVyHzDF4yf4A8jkR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 23, 2013 at 11:31:27AM -0400, Rich Felker wrote: > On Tue, Apr 23, 2013 at 06:17:15PM +0300, Timerlan Moldobaev wrote: > > Can you please specify what tests within cluts should work correctly ? > > There are chances that in my specific environment some musl issues might > > pop up even when running cluts partly. > > I can assist in debugging such issues (as it was for testsuite case). > > Yes, I'm actually working on a patch right now that disables the > incorrect tests and fixes up some other issues. Here's the patch. I've just disabled the EINTR test module entirely since it's full of wrong code including broken attempts at synchronization based on a volatile variable, and attempts to unlock a lock that's already unlocked. The other main issue was invalid numeric tests. Note that the setuid race test will not work without root, and I don't think it's reliable anyway. There's an alternate test for this issue on the glibc bug tracker: http://sourceware.org/bugzilla/show_bug.cgi?id=13347 Rich --qVyHzDF4yf4A8jkR Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="fix_wrong_tests.diff" Content-Transfer-Encoding: 8bit diff --git a/tests/buf.c b/tests/buf.c index 396c5fd..1f63eaf 100644 --- a/tests/buf.c +++ b/tests/buf.c @@ -11,7 +11,7 @@ #include //confstr, getcwd, gethostname, readlink #include //iconv #include //time, gmtime -//#include //strfmon +#include //strfmon /* * Copyright (c) 2011 Luka Marčetić @@ -44,9 +44,7 @@ static int wrap_gethostname(char *name, size_t namelen); static int wrap_mbstowcs(wchar_t *pwcs, char *s, size_t n); static int wrap_snprintf(char *s, size_t n, char *format/*, ...*/); static int wrap_readlink(char *path, char *buf, size_t bufsize); -#ifndef MUSL static int wrap_strfmon(char *s, size_t maxsize, char *format/*,...*/, float F); -#endif static int wrap_strftime(char *s, size_t maxsize, char *format, struct tm *timeptr); static int wrap_wcstombs(char *s, wchar_t *pwcs, size_t n); @@ -239,7 +237,6 @@ int main() break; case 10: fun = sreturnf("strfmon(s, sizeof(s)-1, \"%%!i\", 123.0)"); - #ifndef MUSL s = malloc(80); size = strfmon(s, 80, "%!i", 123.0) + 1; free(s); s = NULL; @@ -256,9 +253,6 @@ int main() wrong = 2; else if (err != (err_expected = E2BIG)) wrong = 3; - #else - wrong = -3; - #endif break; case 11: fun = sreturnf("strftime(s, sizeof(s)-1, \"%Y\", tm)"); @@ -488,7 +482,6 @@ static int wrap_readlink(char *path, char *buf, size_t bufsize) sigaction(SIGSEGV, &oldact[0], NULL); return err; } -#ifndef MUSL static int wrap_strfmon(char *s, size_t maxsize, char *format/*, ...*/, float F) { int err = 0; @@ -501,7 +494,6 @@ static int wrap_strfmon(char *s, size_t maxsize, char *format/*, ...*/, float F) sigaction(SIGSEGV, &oldact[0], NULL); return err; } -#endif static int wrap_strftime(char *s,size_t maxsize,char *format,struct tm *timeptr) { int err = 0; diff --git a/tests/numeric.c b/tests/numeric.c index 7031f7f..ac97271 100644 --- a/tests/numeric.c +++ b/tests/numeric.c @@ -223,12 +223,14 @@ int main() {(int[]){2,fnr_strtoul, fnr_wcstoul}, max[7], wcslen(max[7]), b_zero, {.ul = ULONG_MAX}, ERANGE}, {(int[]){2,fnr_strtoull, fnr_wcstoull}, max[8], wcslen(max[8]), b_zero, {.ull= ULLONG_MAX}, ERANGE}, +#ifdef WANT_WRONG_TESTS {(int[]){2,fnr_strtof, fnr_wcstof}, max[9], wcslen(max[9]), b_sixteen, {.f = HUGE_VALF}, ERANGE}, {(int[]){2,fnr_strtof, fnr_wcstof}, max[10], wcslen(max[10]), b_sixteen, {.f = -HUGE_VALF}, ERANGE}, {(int[]){2,fnr_strtod, fnr_wcstod}, max[11], wcslen(max[11]), b_sixteen, {.d = HUGE_VAL}, ERANGE}, {(int[]){2,fnr_strtod, fnr_wcstod}, max[12], wcslen(max[12]), b_sixteen, {.d = -HUGE_VAL}, ERANGE}, {(int[]){2,fnr_strtold, fnr_wcstold}, max[13], wcslen(max[13]), b_sixteen, {.ld = HUGE_VALL}, ERANGE}, {(int[]){2,fnr_strtold, fnr_wcstold}, max[14], wcslen(max[14]), b_sixteen, {.ld = -HUGE_VALL}, ERANGE}, +#endif }; struct sscanf_tests { @@ -250,6 +252,7 @@ int main() {f_sscanf, L"--1", 0, r_zero, -1}, {f_sscanf, L"-+1", 0, r_zero, -1}, {f_sscanf, L"+-1", 0, r_zero, -1}, +#ifdef WANT_WRONG_TESTS //the 'longest initial subsequence OF THE EXPECTED FORM' is "0" {f_sscanfx, L"0x", 1, r_zero, 0}, {f_sscanfx, L"0x 1", 1, r_zero, 0}, @@ -291,6 +294,7 @@ int main() {f_sscanf_decimal, L"1E+0", 1, r_one, 0}, {f_sscanf_decimal, L"1e-0", 1, r_one, 0}, {f_sscanf_decimal, L"1E-0", 1, r_one, 0}, +#endif }; failed=0; @@ -505,16 +509,12 @@ static int test_function(const int function_nr, const int base, } break; case fnr_strtof: - #ifndef MUSL case fnr_wcstof: - #endif case fnr_sscanff: if (function_nr == fnr_strtof) rval.f = strtof(nptr, &endptr); - #ifndef MUSL else if (function_nr == fnr_wcstof) rval.f = wcstof(wnptr, &wendptr); - #endif else ret = sscanf(nptr, "%f", &rval.f); err = errno; @@ -526,16 +526,12 @@ static int test_function(const int function_nr, const int base, } break; case fnr_strtod: - #ifndef MUSL case fnr_wcstod: - #endif case fnr_sscanfd: if (function_nr == fnr_strtod) rval.d = strtod(nptr, &endptr); - #ifndef MUSL else if (function_nr == fnr_wcstod) rval.d = wcstod(wnptr, &wendptr); - #endif else ret = sscanf(nptr, "%lf", &rval.d); err = errno; @@ -547,16 +543,12 @@ static int test_function(const int function_nr, const int base, } break; case fnr_strtold: - #ifndef MUSL case fnr_wcstold: - #endif case fnr_sscanfld: if (function_nr == fnr_strtold) rval.ld = strtold(nptr, &endptr); - #ifndef MUSL else if (function_nr == fnr_wcstold) rval.ld = wcstold(wnptr, &wendptr); - #endif else ret = sscanf(nptr, "%Lf", &rval.ld); err = errno; diff --git a/tests/pthread_eintr.c b/tests/pthread_eintr.c index 4ee0a22..b0a4b08 100644 --- a/tests/pthread_eintr.c +++ b/tests/pthread_eintr.c @@ -75,9 +75,7 @@ static int wrap_pthread_atfork(void (*prepare)(void), static int wrap_pthread_sigmask(int how, const sigset_t *restrict set, sigset_t *restrict oset); -#ifndef MUSL static int wrap_pthread_setschedprio(pthread_t thread, int prio); -#endif static int wrap_pthread_setconcurrency(int new_level); static int wrap_pthread_detach(pthread_t thread); static int wrap_pthread_key_create(pthread_key_t *key, @@ -124,6 +122,9 @@ int main() struct sigaction act = {.sa_handler=handle, .sa_flags=SA_NODEFER}; +#ifndef WANT_WRONG_TESTS + return 0; +#endif failed = 0; for (i=0; i < (nr_fun=sizeof(function)/sizeof(*function)); ++i) { pipe(pfd); @@ -169,14 +170,14 @@ int main() case 7: err = wrap_pthread_sigmask(SIG_UNBLOCK, NULL, NULL); break; - #ifndef MUSL case 8: - err = wrap_pthread_setschedprio( - tid, - sched_get_priority_min(sched_getscheduler(0)) - ); + { + struct sched_param param; + int policy; + pthread_getschedparam(tid, &policy, ¶m); + err = wrap_pthread_setschedprio(tid, param.sched_priority); + } break; - #endif case 9: err = wrap_pthread_setconcurrency(pthread_getconcurrency()); break; @@ -188,12 +189,16 @@ int main() err = wrap_pthread_key_create(&tkey, NULL); break; case 12: +#ifdef WANT_WRONG_TESTS if (!pthread_rwlock_init(&tlock, NULL)) { err = wrap_pthread_rwlock_unlock(&tlock); pthread_rwlock_destroy(&tlock); } else err = -2; +#else + err = 0; +#endif break; case 13: err = wrap_pthread_kill(tid, 0); @@ -403,7 +408,6 @@ static int wrap_pthread_sigmask(int how, err = pthread_sigmask(how, set, oset); WRAP_END } -#ifndef MUSL static int wrap_pthread_setschedprio(pthread_t thread, int prio) { WRAP_START @@ -411,7 +415,6 @@ static int wrap_pthread_setschedprio(pthread_t thread, int prio) err = pthread_setschedprio(thread, prio); WRAP_END } -#endif static int wrap_pthread_setconcurrency(int new_level) { WRAP_START --qVyHzDF4yf4A8jkR-- From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3177 Path: news.gmane.org!not-for-mail From: Timerlan Moldobaev Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts test suite with musl Date: Wed, 24 Apr 2013 15:26:57 +0300 Message-ID: References: <20130423134038.GX20323@brightrain.aerifal.cx> <20130423153127.GA20323@brightrain.aerifal.cx> <20130423154705.GB20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b86db60fb858204db1a6ada X-Trace: ger.gmane.org 1366806426 4026 80.91.229.3 (24 Apr 2013 12:27:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Apr 2013 12:27:06 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3181-gllmg-musl=m.gmane.org@lists.openwall.com Wed Apr 24 14:27:10 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UUyn0-0004Rk-73 for gllmg-musl@plane.gmane.org; Wed, 24 Apr 2013 14:27:10 +0200 Original-Received: (qmail 30267 invoked by uid 550); 24 Apr 2013 12:27:08 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 30259 invoked from network); 24 Apr 2013 12:27:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=cde+zKmlAs5CgLxP6sYdm8+gzK2M26aVPLo8EzhgfRc=; b=RrZKP90cSTarnldc2zoLfJHCOK5xDfdueLRFNOSbJpUdYFx+FwQ3iyXO1C+uaDKxZZ 9vUUkYyvo2kSopXpqaLOujs2YOhOLgSD/Z2gAgMM93igcmJVhf7cQwy9bDbvPT3t7Fd7 ZZ3UUKV35PKilbv8NumYLZvOZJ/G/IqEe4b3ACf6rHBZ/AYJYSNoKDtFH7E4tBHS8wq/ qbs1112Hk6bSK8FekHwX1bwa3cf5pWT7W4xU55XpDpItFFmUF5pRJVSx0MmWiJx/A4HB eZ1kGW+Hpnz1LJ0+qRLosHhSsb3mo77IdWx0WmVzFtTiGK0tfrOCzxd9dSQr3FDpOibW 7HhQ== X-Received: by 10.194.63.109 with SMTP id f13mr68119992wjs.11.1366806417341; Wed, 24 Apr 2013 05:26:57 -0700 (PDT) In-Reply-To: <20130423154705.GB20323@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:3177 Archived-At: --047d7b86db60fb858204db1a6ada Content-Type: text/plain; charset=ISO-8859-1 Thanks ! I applied the patch. Still have some tests failing. For instance tests/buf fails with the following error message: iconv(&<"abcd">, &<4>, &s, &<3>) caused a SIGSEGV! I am not sure but it seems that iconv() that is called from wrap_iconv() should return an error return value and set an errno value. At least to my understanding that the way the test is written. For musl implementation of iconv() returns 0 and sets no errno. While in the case of standard Linux implementation, errno = E2BIG and -1 returned ( error return value) . For the case buf linked dynamically against the standard libc.so library: ldd tests/buf libpthread.so.0 => /lib64/libpthread.so.0 (0x00000030d1000000) librt.so.1 => /lib64/librt.so.1 (0x00000030d4400000) libm.so.6 => /lib64/libm.so.6 (0x00000030d0800000) libc.so.6 => /lib64/libc.so.6 (0x00000030d0400000) /lib64/ld-linux-x86-64.so.2 (0x00000030cf400000) > uname -a Linux lnxbdc96 2.6.18-164.11.1.el5 #1 SMP Wed Jan 6 13:26:04 EST 2010 x86_64 x86_64 x86_64 GNU/Linux Can you please look into this ? Thanks. On Tue, Apr 23, 2013 at 6:47 PM, Rich Felker wrote: > On Tue, Apr 23, 2013 at 11:31:27AM -0400, Rich Felker wrote: > > On Tue, Apr 23, 2013 at 06:17:15PM +0300, Timerlan Moldobaev wrote: > > > Can you please specify what tests within cluts should work > correctly ? > > > There are chances that in my specific environment some musl issues > might > > > pop up even when running cluts partly. > > > I can assist in debugging such issues (as it was for testsuite case). > > > > Yes, I'm actually working on a patch right now that disables the > > incorrect tests and fixes up some other issues. > > Here's the patch. I've just disabled the EINTR test module entirely > since it's full of wrong code including broken attempts at > synchronization based on a volatile variable, and attempts to unlock a > lock that's already unlocked. > > The other main issue was invalid numeric tests. > > Note that the setuid race test will not work without root, and I don't > think it's reliable anyway. There's an alternate test for this issue > on the glibc bug tracker: > > http://sourceware.org/bugzilla/show_bug.cgi?id=13347 > > Rich > --047d7b86db60fb858204db1a6ada Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks !

I applied the patch. Still hav= e some tests failing.

For instance tests/buf fails= with the following error message:

iconv(&<= "abcd">, &<4>, &s, &<3>) caused a SIGS= EGV!

I am not sure but =A0it seems that iconv() =A0that is c= alled from wrap_iconv() should return =A0an error return value and set an e= rrno value.=A0
At least to my understanding =A0that the way the t= est is written.=A0
For musl=A0implementation=A0of iconv() =A0returns 0 and sets no errno.= =A0

While in the case of standard Linux implementa= tion, errno =3D=A0E2BIG and -1 returned ( error return value) .
<= br>
For the case buf linked dynamically against the standard libc.so= library:

=A0ldd tests/buf
= =A0 =A0 =A0 =A0 libpthread.so.0 =3D> /lib64/libpthread.so.0 (0x00000030d= 1000000)
=A0 =A0 =A0 =A0 librt.so.1 =3D> /lib64/librt.so.1 (0x00000030d44000= 00)
=A0 =A0 =A0 =A0 libm.so.6 =3D> /lib64/libm.so.6 (0x0000003= 0d0800000)
=A0 =A0 =A0 =A0 libc.so.6 =3D> /lib64/libc.so.6 (0x= 00000030d0400000)
=A0 =A0 =A0 =A0 /lib64/ld-linux-x86-64.so.2 (0x00000030cf400000)

> uname -a
Linux lnxbdc96 2.6.18-164= .11.1.el5 #1 SMP Wed Jan 6 13:26:04 EST 2010 x86_64 x86_64 x86_64 GNU/Linux=

Can you please look into this ?=A0

Thanks.



On Tue, Ap= r 23, 2013 at 6:47 PM, Rich Felker <dalias@aerifal.cx> wrote= :
On T= ue, Apr 23, 2013 at 11:31:27AM -0400, Rich Felker wrote:
> On Tue, Apr 23, 2013 at 06:17:15PM +0300, Timerlan Moldobaev wrote: > > Can you please specify what =A0tests within cluts =A0should =A0wo= rk correctly ?
> > There are chances that in my specific environment some musl issue= s might
> > pop up even when running cluts partly.
> > I can assist in debugging such issues (as it was for testsuite ca= se).
>
> Yes, I'm actually working on a patch right now that disables the > incorrect tests and fixes up some other issues.

Here's the patch. I've just disabled the EINTR test mod= ule entirely
since it's full of wrong code including broken attempts at
synchronization based on a volatile variable, and attempts to unlock a
lock that's already unlocked.

The other main issue was invalid numeric tests.

Note that the setuid race test will not work without root, and I don't<= br> think it's reliable anyway. There's an alternate test for this issu= e
on the glibc bug tracker:

http://sourceware.org/bugzilla/show_bug.cgi?id=3D13347

Rich

--047d7b86db60fb858204db1a6ada-- From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3180 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: cluts test suite with musl Date: Wed, 24 Apr 2013 09:32:13 -0400 Message-ID: <20130424133213.GD20323@brightrain.aerifal.cx> References: <20130423134038.GX20323@brightrain.aerifal.cx> <20130423153127.GA20323@brightrain.aerifal.cx> <20130423154705.GB20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1366810343 17165 80.91.229.3 (24 Apr 2013 13:32:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Apr 2013 13:32:23 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3184-gllmg-musl=m.gmane.org@lists.openwall.com Wed Apr 24 15:32:27 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UUzoB-0001Bt-DW for gllmg-musl@plane.gmane.org; Wed, 24 Apr 2013 15:32:27 +0200 Original-Received: (qmail 32200 invoked by uid 550); 24 Apr 2013 13:32:26 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32192 invoked from network); 24 Apr 2013 13:32:26 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3180 Archived-At: On Wed, Apr 24, 2013 at 03:26:57PM +0300, Timerlan Moldobaev wrote: > Thanks ! > > I applied the patch. Still have some tests failing. > > For instance tests/buf fails with the following error message: > > iconv(&<"abcd">, &<4>, &s, &<3>) caused a SIGSEGV! > > I am not sure but it seems that iconv() that is called from wrap_iconv() > should return an error return value and set an errno value. > At least to my understanding that the way the test is written. > For musl implementation of iconv() returns 0 and sets no errno. > > While in the case of standard Linux implementation, errno = E2BIG and -1 > returned ( error return value) . > > For the case buf linked dynamically against the standard libc.so library: > > ldd tests/buf > libpthread.so.0 => /lib64/libpthread.so.0 (0x00000030d1000000) > librt.so.1 => /lib64/librt.so.1 (0x00000030d4400000) > libm.so.6 => /lib64/libm.so.6 (0x00000030d0800000) > libc.so.6 => /lib64/libc.so.6 (0x00000030d0400000) > /lib64/ld-linux-x86-64.so.2 (0x00000030cf400000) > > > uname -a > Linux lnxbdc96 2.6.18-164.11.1.el5 #1 SMP Wed Jan 6 13:26:04 EST 2010 > x86_64 x86_64 x86_64 GNU/Linux > > Can you please look into this ? Yes, the test is invoking undefined behavior by failing to check the return value of iconv_open and passing an invalid conversion descriptor ((iconv_t)-1) to iconv. I don't know why it's crashing for you but not me; probably a difference from being 64-bit vs 32-bit affecting the way the bits of the conversion descriptor are handled. Apparently the test was written based on GNU documentation that allows "" as an alias for the current locale's encoding. This usage is non-portable, but may be something we should add to musl. nl_langinfo(CODESET) is the portable way to get this. Rich