NetBSD Problem Report #54692

From  Tue Nov 12 05:50:49 2019
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 0EBC97A169
	for <>; Tue, 12 Nov 2019 05:50:49 +0000 (UTC)
Message-Id: <>
Date: Tue, 12 Nov 2019 05:50:48 +0000 (UTC)
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
NetBSD localhost 8.1 NetBSD 8.1 (GENERIC) #0: Fri May 31 08:43:59 UTC 2019 GENERIC amd64
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.
$ locale -k nonexistant && echo success

From: AJ Jordan <>
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

From: "Jukka Ruohonen" <>
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

 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 \

 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:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.