Skip to content

Commit ea03256

Browse files
committed
Disable qsort_r test on NetBSD.
1 parent d318e38 commit ea03256

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

tests/check_full_msg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ char aa[] = { 1, 2, 3 };
1111

1212
// Under Asan qsort and callback are intercepted
1313
// so addresses are located in libasan (not a.out)
14-
// SKIPPED: asan
14+
// SKIP: asan
1515

1616
// CMDLINE: a b c
1717
// CHECK: a.out.*: qsort: comparison function returns unstable results (comparison function .*a.out+.*, called from .*a.out+.*, cmdline is ".*/a.out a b c")

tests/good_bsearch_2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ char k = 1;
1111
char aa[] = { 1, 2, 3 };
1212

1313
// TODO: why this fails under Asan?
14-
// SKIPPED: asan
14+
// SKIP: asan
1515

1616
// OPTS: check=default,good_bsearch
1717
// CHECK: comparison function is not symmetric

tests/sort_r_nonsym_1.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Yury Gribov
2+
* Copyright 2018-2024 Yury Gribov
33
*
44
* Use of this source code is governed by MIT license that can be
55
* found in the LICENSE.txt file.
@@ -10,6 +10,9 @@
1010

1111
char aa[] = { 1, 2, 3 };
1212

13+
// NetBSD misses qsort_r: https://gnats.netbsd.org/58931
14+
// SKIP: netbsd
15+
1316
// CHECK: comparison function is not symmetric
1417
int cmp(const void *pa, const void *pb, void *a) {
1518
int *arg = (int *)a;

tests/test.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,28 @@ for t in tests/*.c; do
8181
else
8282
ARGS=
8383
fi
84-
if has_option $t SKIPPED; then
84+
if has_option $t SKIP; then
8585
SKIP=
86-
for d in $(get_option $t SKIPPED | sed -e 's/, *//g'); do
86+
for d in $(get_option $t SKIP | sed -e 's/, *//g'); do
8787
case $d in
8888
asan)
8989
if test -n "$ASAN_PRELOAD"; then
9090
SKIP=1
9191
break
9292
fi
9393
;;
94+
bsd)
95+
if uname | grep -q BSD; then
96+
SKIP=1
97+
break
98+
fi
99+
;;
100+
netbsd)
101+
if uname | grep -q NetBSD; then
102+
SKIP=1
103+
break
104+
fi
105+
;;
94106
*)
95107
echo >&2 "$t: unknown disabling: $d"
96108
exit 1

0 commit comments

Comments
 (0)