NetBSD Problem Report #49283

From www@NetBSD.org  Tue Oct 14 06:13:02 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id AD279A663A
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 14 Oct 2014 06:13:02 +0000 (UTC)
Message-Id: <20141014061301.A5D21A6687@mollari.NetBSD.org>
Date: Tue, 14 Oct 2014 06:13:01 +0000 (UTC)
From: yaneurabeya@gmail.com
Reply-To: yaneurabeya@gmail.com
To: gnats-bugs@NetBSD.org
Subject: lib/libc/gen/t_getgrent:getgrent_loop isn't deterministic if hooked into an auth backend in flux, can timeout, etc
X-Send-Pr-Version: www-1.0

>Number:         49283
>Category:       bin
>Synopsis:       lib/libc/gen/t_getgrent:getgrent_loop isn't deterministic if hooked into an auth backend in flux, can timeout, etc
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 14 06:15:00 +0000 2014
>Originator:     Garrett Cooper
>Release:        n/a
>Organization:
EMC / Isilon Storage Division
>Environment:
n/a
>Description:
The lib/libc/gen/t_getgrent:getgrent_loop testcase counts the number of groups iterated over with getgrent by counting the number of iterations, calling setgrent to rewind the database, then force the database to be reopened by calling endgrent, then getgrent in a loop.

There are a couple issues that come to mind with this testcase:

- If the groups change between any of the 3 phases, the testcase will fail with little to no helpful diagnostic info.
- If there's a large group database or the auth backend is slow, the testcase can timeout.
>How-To-Repeat:
Mangle /etc/group while running the testcase or do the equivalent with the NIS/YP backend.
>Fix:
It would be nice if getgrent could operate on files, file descriptors, or other things, so it could be unit tested a bit better.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.