NetBSD Problem Report #54370
From gson@gson.org Thu Jul 11 19:42:52 2019
Return-Path: <gson@gson.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 1D8137A174
for <gnats-bugs@gnats.NetBSD.org>; Thu, 11 Jul 2019 19:42:52 +0000 (UTC)
Message-Id: <20190711194246.717F49896B4@guava.gson.org>
Date: Thu, 11 Jul 2019 22:42:46 +0300 (EEST)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: lib/libc/sys/t_getitimer/setitimer_old test case fails randomly
X-Send-Pr-Version: 3.95
>Number: 54370
>Category: kern
>Synopsis: lib/libc/sys/t_getitimer/setitimer_old test case fails randomly
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 11 19:45:00 +0000 2019
>Closed-Date: Sat Jul 13 13:46:22 +0000 2019
>Last-Modified: Sat Jul 13 13:46:22 +0000 2019
>Originator: Andreas Gustafsson
>Release: NetBSD 8.1, -current
>Organization:
>Environment:
System: NetBSD
Architecture: x86_64
Machine: amd64
>Description:
The setitimer_old test case of the lib/libc/sys/t_getitimer test randomly
fails with the message "FAILED: setitimer(2) did not store old values".
I have reproduced this in -current/i386 under qemu and 8.1/amd64 on
real hardware.
>How-To-Repeat:
This usually triggers a failure in less than a minute for me:
cd /usr/tests/lib/libc/sys
while ./t_getitimer setitimer_old; do true; done
>Fix:
>Release-Note:
>Audit-Trail:
From: Andreas Gustafsson <gson@gson.org>
To: gnats-bugs@netbsd.org
Cc: Paul Goyette <paul@whooppee.com>
Subject: Re: kern/54370: lib/libc/sys/t_getitimer/setitimer_old test case fails randomly
Date: Fri, 12 Jul 2019 00:00:01 +0300
This looks like a bogus test. The test is checking that the "previous
value" returned by setitimer() via ovalue is the value that was last
set by an earlier setitimer() call, but it is actually the timer's
*current* value, which is decreasing with time, so the test fails
whenever a clock interrupt happens between the two setitimer() calls.
--
Andreas Gustafsson, gson@gson.org
From: "Andreas Gustafsson" <gson@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54370 CVS commit: src/tests/lib/libc/sys
Date: Sat, 13 Jul 2019 12:44:02 +0000
Module Name: src
Committed By: gson
Date: Sat Jul 13 12:44:02 UTC 2019
Modified Files:
src/tests/lib/libc/sys: t_getitimer.c
Log Message:
In the setitimer_old test case, allow for time passing between the two
setitimer() calls. Should fix PR kern/54370.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_getitimer.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: gson@NetBSD.org
State-Changed-When: Sat, 13 Jul 2019 13:46:22 +0000
State-Changed-Why:
Should be fixed now.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.