NetBSD Problem Report #60002

From www@netbsd.org  Sat Feb 14 15:36:59 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "R13" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 733041A923C
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 14 Feb 2026 15:36:59 +0000 (UTC)
Message-Id: <20260214153658.9A50F1A923D@mollari.NetBSD.org>
Date: Sat, 14 Feb 2026 15:36:58 +0000 (UTC)
From: yaneurabeya@gmail.com
Reply-To: yaneurabeya@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [PATCH] tests/kernel/t_mqueue: port to FreeBSD
X-Send-Pr-Version: www-1.0
X-From4GNATS: "yaneurabeya@gmail.com via gnats" <gnats-admin@NetBSD.org>

>Number:         60002
>Category:       bin
>Synopsis:       [PATCH] tests/kernel/t_mqueue: port to FreeBSD
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 14 15:40:00 +0000 2026
>Last-Modified:  Sun Feb 15 13:15:01 +0000 2026
>Originator:     Enji Cooper
>Release:        n/a
>Organization:
>Environment:
n/a
>Description:
The attached patch makes changes needed to quell compiler warnings on FreeBSD and port the test to FreeBSD / fix the test with `kyua debug`.

Obtained from: FreeBSD.
>How-To-Repeat:

>Fix:
See the patch attached to https://patch-diff.githubusercontent.com/raw/NetBSD/src/pull/67.patch .

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60002 CVS commit: src/tests/kernel
Date: Sun, 15 Feb 2026 08:13:37 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Sun Feb 15 13:13:37 UTC 2026

 Modified Files:
 	src/tests/kernel: t_mqueue.c

 Log Message:
 PR/60002: Enji Cooper:
 mq_open in FreeBSD and NetBSD both state that the path provided to the
 target mqueue should (in the POSIX parlance of "should") start with a /.
 In FreeBSD this proved to be more of an issue than NetBSD (especially
 when `kyua debug` was involved). Instead of relying on a temp directory
 which might exist outside the kyua sandbox, make the mqueue path
 absolute to the prefix `/t_mqueue` (for consistency with the test), and
 add the test PID to the path to avoid potential collisions between
 back-to-back / concurrent test runs.

 While here, explicitly cast the checked return value to `mqd_t`: this is
 needed because some platforms--including FreeBSD--might define `mqd_t` as
 an unsigned type instead of a signed type. Casting it to `mqd_t` helps
 quell a valid compiler warning in that case.


 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.7 src/tests/kernel/t_mqueue.c

 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.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.