From owner-freebsd-current@FreeBSD.ORG Sun Apr 20 19:10:29 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B24AA37B401; Sun, 20 Apr 2003 19:10:29 -0700 (PDT) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3352E43F3F; Sun, 20 Apr 2003 19:10:29 -0700 (PDT) (envelope-from leimy2k@mac.com) Received: from asmtp01.mac.com (asmtp01-qfe3 [10.13.10.65]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id h3L2AT0x026738; Sun, 20 Apr 2003 19:10:29 -0700 (PDT) Received: from mac.com ([67.33.226.72]) by asmtp01.mac.com (Netscape Messaging Server 4.15) with ESMTP id HDO8PG00.KBY; Sun, 20 Apr 2003 19:10:28 -0700 Date: Sun, 20 Apr 2003 21:10:26 -0500 Mime-Version: 1.0 (Apple Message framework v552) Content-Type: text/plain; charset=US-ASCII; format=flowed From: David Leimbach To: freebsd-current@freebsd.org, freebsd-standards@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <6AE199CE-739E-11D7-98DE-0003937E39E0@mac.com> X-Mailer: Apple Mail (2.552) Subject: test-strerror regression test X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2003 02:10:30 -0000 In /usr/src/tools/regression/lib/libc/string there is a test "test-strerror.c" which attempts to verify a correct value for strerror(0); This is probably a bogus value for strerror even though the posix standard does say it returns a string for any int. Unless the locales for the area are all predefined somewhere we probably don't need this regression test as it tests for the validity of the strings. In fact this test fails due to it not asserting the correct string. errno = 0; sret = strerror(0); assert(strcmp(sret, "Unknown Error: 0") == 0); assert(errno == EINVAL); I don't think this code has been tested in a long time... The string should be "Undefined error: 0" and why would 0 errno be EINVAL? If we are going to have a test suite it should at least be correct and documented don't you think? Dave