Fri Aug 28 19:29:58 2020 UTC ()
lockme_DOUBLEINIT:
The failure message differs slightly when using LOCKDEBUG, modify the
expected pattern to cover both variants.


(martin)
diff -r1.5 -r1.6 src/tests/rump/rumpkern/t_kern.c

cvs diff -r1.5 -r1.6 src/tests/rump/rumpkern/t_kern.c (expand / switch to unified diff)

--- src/tests/rump/rumpkern/t_kern.c 2017/05/03 12:09:41 1.5
+++ src/tests/rump/rumpkern/t_kern.c 2020/08/28 19:29:58 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: t_kern.c,v 1.5 2017/05/03 12:09:41 pgoyette Exp $ */ 1/* $NetBSD: t_kern.c,v 1.6 2020/08/28 19:29:58 martin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2011 The NetBSD Foundation, Inc. 4 * Copyright (c) 2011 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -102,27 +102,27 @@ locktest(const atf_tc_t *tc, enum lockte @@ -102,27 +102,27 @@ locktest(const atf_tc_t *tc, enum lockte
102 regfree(&preg); 102 regfree(&preg);
103 } 103 }
104 break; 104 break;
105 case -1: 105 case -1:
106 atf_tc_fail("fork"); 106 atf_tc_fail("fork");
107 } 107 }
108} 108}
109 109
110LOCKFUN(DESTROYHELD, "destroy lock while held", 0, 110LOCKFUN(DESTROYHELD, "destroy lock while held", 0,
111 "mutex error: mutex_destroy,.*: is locked or in use"); 111 "mutex error: mutex_destroy,.*: is locked or in use");
112LOCKFUN(DOUBLEFREE, "free lock twice", 0, 112LOCKFUN(DOUBLEFREE, "free lock twice", 0,
113 "panic: mutex_destroy,.*: uninitialized lock"); 113 "panic: mutex_destroy,.*: uninitialized lock");
114LOCKFUN(DOUBLEINIT, "init lock twice", 1, 114LOCKFUN(DOUBLEINIT, "init lock twice", 1,
115 "mutex error: mutex_init,.*: already initialized"); 115 "mutex error: .*mutex_init,.*: already initialized");
116LOCKFUN(MEMFREE, "free memory active lock is in", 1, 116LOCKFUN(MEMFREE, "free memory active lock is in", 1,
117 "mutex error: kmem_intr_free,.*: allocation contains active lock"); 117 "mutex error: kmem_intr_free,.*: allocation contains active lock");
118LOCKFUN(MTX, "locking-against-self mutex", 0, 118LOCKFUN(MTX, "locking-against-self mutex", 0,
119 "mutex error: mutex_enter,.*: locking against myself"); 119 "mutex error: mutex_enter,.*: locking against myself");
120LOCKFUN(RWDOUBLEX, "locking-against-self exclusive rwlock", 0, 120LOCKFUN(RWDOUBLEX, "locking-against-self exclusive rwlock", 0,
121 "rwlock error: rw_enter,.*: locking against myself"); 121 "rwlock error: rw_enter,.*: locking against myself");
122LOCKFUN(RWRX, "rw: first shared, then exclusive", 1, 122LOCKFUN(RWRX, "rw: first shared, then exclusive", 1,
123 "rwlock error: rw_enter,.*: locking against myself"); 123 "rwlock error: rw_enter,.*: locking against myself");
124LOCKFUN(RWXR, "rw: first execusive, then shared", 0, 124LOCKFUN(RWXR, "rw: first execusive, then shared", 0,
125 "rwlock error: rw_enter,.*: locking against myself"); 125 "rwlock error: rw_enter,.*: locking against myself");
126 126
127ATF_TP_ADD_TCS(tp) 127ATF_TP_ADD_TCS(tp)
128{ 128{