NetBSD Problem Report #54692

From www@netbsd.org  Tue Nov 12 05:50:49 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 0EBC97A169
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 12 Nov 2019 05:50:49 +0000 (UTC)
Message-Id: <20191112055048.419327A26E@mollari.NetBSD.org>
Date: Tue, 12 Nov 2019 05:50:48 +0000 (UTC)
From: alex@strugee.net
Reply-To: alex@strugee.net
To: gnats-bugs@NetBSD.org
Subject: `locale -k` with an invalid keyword exits with 0
X-Send-Pr-Version: www-1.0

>Number:         54692
>Category:       bin
>Synopsis:       `locale -k` with an invalid keyword exits with 0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 12 05:55:00 +0000 2019
>Last-Modified:  Fri Jul 03 04:30:02 +0000 2020
>Originator:     AJ Jordan
>Release:        8.1
>Organization:
>Environment:
NetBSD localhost 8.1 NetBSD 8.1 (GENERIC) #0: Fri May 31 08:43:59 UTC 2019  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile GENERIC amd64
>Description:
Running `locale -k` with a keyword that doesn't exist doesn't work (because the keyword doesn't exist) but `locale` exits with 0 anyway. It should instead exit with a nonzero exit code.
>How-To-Repeat:
$ locale -k nonexistant && echo success
>Fix:

>Audit-Trail:
From: AJ Jordan <alex@strugee.net>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/54692: `locale -k` with an invalid keyword exits with 0
Date: Tue, 12 Nov 2019 06:03:42 +0000

 In my original problem report I neglected to mention that I have found
 an identical bug in FreeBSD. See
 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241906

From: "Jukka Ruohonen" <jruoho@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54692 CVS commit: src
Date: Fri, 3 Jul 2020 04:25:29 +0000

 Module Name:	src
 Committed By:	jruoho
 Date:		Fri Jul  3 04:25:28 UTC 2020

 Modified Files:
 	src/distrib/sets/lists/tests: mi
 	src/etc/mtree: NetBSD.dist.tests
 	src/tests/usr.bin: Makefile
 Added Files:
 	src/tests/usr.bin/locale: Makefile t_locale.sh

 Log Message:
 Add a check for PR bin/54692.


 To generate a diff of this commit:
 cvs rdiff -u -r1.871 -r1.872 src/distrib/sets/lists/tests/mi
 cvs rdiff -u -r1.172 -r1.173 src/etc/mtree/NetBSD.dist.tests
 cvs rdiff -u -r1.32 -r1.33 src/tests/usr.bin/Makefile
 cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/locale/Makefile \
     src/tests/usr.bin/locale/t_locale.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.