xref: /illumos-gate/usr/src/test/libc-tests/tests/select/select.sh (revision 20a7641f9918de8574b8b3b47dbe35c4bfc78df1)
1#! /usr/bin/sh
2#
3#
4# This file and its contents are supplied under the terms of the
5# Common Development and Distribution License ("CDDL"), version 1.0.
6# You may only use this file in accordance with the terms of version
7# 1.0 of the CDDL.
8#
9# A full copy of the text of the CDDL should have accompanied this
10# source.  A copy of the CDDL is also available via the Internet at
11# http://www.illumos.org/license/CDDL.
12#
13
14# Copyright 2016, Richard Lowe.
15
16select_test=$(dirname $0)/select_test
17
18
19# Below the stack and bulk alloc limits
20i=0
21while (( $i < 500 )); do
22    i=$(($i + 1))
23
24    $select_test 512 || exit 1
25done;
26
27# above the stack limit
28i=0
29while (( $i < 500 )); do
30    i=$(($i + 1))
31
32    $select_test 2048 || exit 1
33done;
34
35# above the bulk limit
36i=0
37while (( $i < 500 )); do
38    i=$(($i + 1))
39
40    $select_test 9001 || exit 1
41done;
42