From patchwork Mon Feb 11 15:33:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 219622 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id A754D2C02F5 for ; Tue, 12 Feb 2013 02:34:55 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1361201695; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Date:From:To:CC:Subject:Message-ID:MIME-Version: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=mBjNewv lxy4O8gsFpkn+ovNA3VI=; b=lMzG366cUd69KOIIvsJadHkVf7JsStUNFJLDhFC npRoWh0A0YKddh8Qr1zqSIIZS+S7Y2cB17Te6L57w8M3IPSDTbjt75s5PcHLWkNI jILG1X3H8Z/xa9lrUey6kY/OrYpDOqWY7nnH74SVjCzk6ucI2/+aaFgsFm3NsXUp TvJA= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Date:From:To:CC:Subject:Message-ID:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=F7UOLXKjuYZF/clxyw5soitt3pDC4yBk26uiPdDfcFT7s9e8qWH6fRSXWLnET+ T4igIKSSRQ7KqYf+SqIoWaT/WrFe5jrkyNp8CohCe9yqQYgkQOUdfusddCLoxKY9 GO1bq50uGxd6ASMFfYdOkWweLRfl1QRC/b8SVywrS2tb4=; Received: (qmail 1389 invoked by alias); 11 Feb 2013 15:34:21 -0000 Received: (qmail 1277 invoked by uid 22791); 11 Feb 2013 15:34:20 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL, BAYES_00, FROM_12LTRDOM, KHOP_RCVD_UNTRUST, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Feb 2013 15:34:09 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1U4vOS-00074N-6T from Julian_Brown@mentor.com ; Mon, 11 Feb 2013 07:34:08 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 11 Feb 2013 07:34:08 -0800 Received: from octopus (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Mon, 11 Feb 2013 15:34:05 +0000 Date: Mon, 11 Feb 2013 15:33:59 +0000 From: Julian Brown To: CC: libstdc++ Subject: [PATCH, libstdc++] Fix 22_locale/time_get/get_weekday/char/38081-[12].cc tests for glibc 2.17 Message-ID: <20130211153359.74f27ab4@octopus> MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, It seems that glibc 2.17 changes the abbreviated names of weekdays for "ru_RU" locales by removing an extraneous ".", as described in: http://sourceware.org/bugzilla/show_bug.cgi?id=10873 An earlier patch (circa glibc 2.14) changed (IIUC!) archaic/unusual three-letter abbreviations to more-common two-letter abbreviations, but included dots after each weekday name, which was apparently still wrong. But, the two tests of this feature in the libstdc++ testsuite expect those dots to be present, so they fail. So, the attached patch simply removes the expectation that dots are present in the abbreviated names from the libstdc++ tests in question, if the glibc version in use is recent enough. The tests pass (with a current gcc, trunk eglibc) with the attached patch, and fail (for me) without it (cross-testing to ARM Linux, for no particular reason). OK to apply? Thanks, Julian ChangeLog libstdc++/ * testsuite/22_locale/time_get/get_weekday/char/38081-1.cc (test01): Don't expect dots after abbreviated weekday names for ru_RU for glibc versions >= 2.17. * testsuite/22_locale/time_get/get_weekday/char/38081-2.cc (test01): Likewise. Index: libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc =================================================================== --- libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc (revision 195939) +++ libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc (working copy) @@ -50,7 +50,11 @@ void test01() // ios_base::iostate&, tm*) const #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14) +# if __GLIBC__ > 2 || __GLIBC_MINOR__ >= 17 + iss.str("\xbf\xdd"); +# else iss.str("\xbf\xdd\x2e"); +# endif #else iss.str("\xbf\xdd\xd4"); #endif @@ -72,7 +76,11 @@ void test01() VERIFY( errorstate == ios_base::eofbit ); #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14) +# if __GLIBC__ > 2 || __GLIBC_MINOR__ >= 17 + iss.str("\xbf\xdd\xd5\xd4\xd5\xdb\xec\xdd\xd8\xda"); +# else iss.str("\xbf\xdd\x2e\xd5\xd4\xd5\xdb\xec\xdd\xd8\xda"); +# endif #else iss.str("\xbf\xdd\xd4\xd5\xd4\xd5\xdb\xec\xdd\xd8\xda"); #endif Index: libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc =================================================================== --- libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc (revision 195939) +++ libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc (working copy) @@ -51,6 +51,15 @@ void test01() // ios_base::iostate&, tm*) const #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14) +# if __GLIBC__ > 2 || __GLIBC_MINOR__ >= 17 + const char* awdays[7] = { "\u0412\u0441", + "\u041F\u043D", + "\u0412\u0442", + "\u0421\u0440", + "\u0427\u0442", + "\u041F\u0442", + "\u0421\u0431" }; +# else const char* awdays[7] = { "\u0412\u0441\u002E", "\u041F\u043D\u002E", "\u0412\u0442\u002E", @@ -58,6 +67,7 @@ void test01() "\u0427\u0442\u002E", "\u041F\u0442\u002E", "\u0421\u0431\u002E" }; +#endif #else const char* awdays[7] = { "\u0412\u0441\u043A", "\u041F\u043D\u0434",