S390: Optimize strcat and wcscat.
[glibc.git] / posix / tst-getconf.sh
blobe0582a70bd1e116baae28abbbfdc0b7f5ed78f6f
1 #! /bin/sh
2 # Test for getconf(1).
3 # Copyright (C) 2001-2015 Free Software Foundation, Inc.
4 # This file is part of the GNU C Library.
6 # The GNU C Library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License, or (at your option) any later version.
11 # The GNU C Library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with the GNU C Library; if not, see
18 # <http://www.gnu.org/licenses/>.
20 set -e
22 common_objpfx=$1; shift
23 run_getconf=$1; shift
25 logfile=$common_objpfx/posix/tst-getconf.out
27 rm -f $logfile
28 result=0
29 while read name; do
30 printf %s "getconf $name: " >> $logfile
31 ${run_getconf} "$name" < /dev/null 2>> $logfile >> $logfile
32 if test $? -ne 0; then
33 echo "*** $name FAILED" >> $logfile
34 result=1
36 done <<EOF
37 AIO_LISTIO_MAX
38 AIO_MAX
39 AIO_PRIO_DELTA_MAX
40 ARG_MAX
41 ATEXIT_MAX
42 BC_BASE_MAX
43 BC_DIM_MAX
44 BC_SCALE_MAX
45 BC_STRING_MAX
46 CHILD_MAX
47 COLL_WEIGHTS_MAX
48 DELAYTIMER_MAX
49 EXPR_NEST_MAX
50 HOST_NAME_MAX
51 IOV_MAX
52 LINE_MAX
53 LOGIN_NAME_MAX
54 NGROUPS_MAX
55 MQ_OPEN_MAX
56 MQ_PRIO_MAX
57 OPEN_MAX
58 _POSIX_ADVISORY_INFO
59 _POSIX_BARRIERS
60 _POSIX_ASYNCHRONOUS_IO
61 _POSIX_BASE
62 _POSIX_C_LANG_SUPPORT
63 _POSIX_C_LANG_SUPPORT_R
64 _POSIX_CLOCK_SELECTION
65 _POSIX_CPUTIME
66 _POSIX_DEVICE_IO
67 _POSIX_DEVICE_SPECIFIC
68 _POSIX_DEVICE_SPECIFIC_R
69 _POSIX_FD_MGMT
70 _POSIX_FIFO
71 _POSIX_FILE_ATTRIBUTES
72 _POSIX_FILE_LOCKING
73 _POSIX_FILE_SYSTEM
74 _POSIX_FSYNC
75 _POSIX_JOB_CONTROL
76 _POSIX_MAPPED_FILES
77 _POSIX_MEMLOCK
78 _POSIX_MEMLOCK_RANGE
79 _POSIX_MEMORY_PROTECTION
80 _POSIX_MESSAGE_PASSING
81 _POSIX_MONOTONIC_CLOCK
82 _POSIX_MULTI_PROCESS
83 _POSIX_NETWORKING
84 _POSIX_PIPE
85 _POSIX_PRIORITIZED_IO
86 _POSIX_PRIORITY_SCHEDULING
87 _POSIX_READER_WRITER_LOCKS
88 _POSIX_REALTIME_SIGNALS
89 _POSIX_REGEXP
90 _POSIX_SAVED_IDS
91 _POSIX_SEMAPHORES
92 _POSIX_SHARED_MEMORY_OBJECTS
93 _POSIX_SHELL
94 _POSIX_SIGNALS
95 _POSIX_SINGLE_PROCESS
96 _POSIX_SPAWN
97 _POSIX_SPIN_LOCKS
98 _POSIX_SPORADIC_SERVER
99 _POSIX_SYNCHRONIZED_IO
100 _POSIX_SYSTEM_DATABASE
101 _POSIX_SYSTEM_DATABASE_R
102 _POSIX_THREAD_ATTR_STACKADDR
103 _POSIX_THREAD_ATTR_STACKSIZE
104 _POSIX_THREAD_CPUTIME
105 _POSIX_THREAD_PRIO_INHERIT
106 _POSIX_THREAD_PRIO_PROTECT
107 _POSIX_THREAD_PRIORITY_SCHEDULING
108 _POSIX_THREAD_PROCESS_SHARED
109 _POSIX_THREAD_SAFE_FUNCTIONS
110 _POSIX_THREAD_SPORADIC_SERVER
111 _POSIX_THREADS
112 _POSIX_TIMEOUTS
113 _POSIX_TIMERS
114 _POSIX_TRACE
115 _POSIX_TRACE_EVENT_FILTER
116 _POSIX_TRACE_INHERIT
117 _POSIX_TRACE_LOG
118 _POSIX_TYPED_MEMORY_OBJECTS
119 _POSIX_USER_GROUPS
120 _POSIX_USER_GROUPS_R
121 _POSIX_VERSION
122 _POSIX_V6_ILP32_OFF32
123 _POSIX_V6_ILP32_OFFBIG
124 _POSIX_V6_LP64_OFF64
125 _POSIX_V6_LPBIG_OFFBIG
126 _POSIX_V6_WIDTH_RESTRICTED_ENVS
127 POSIX2_C_BIND
128 POSIX2_C_DEV
129 POSIX2_C_VERSION
130 POSIX2_CHAR_TERM
131 POSIX2_FORT_DEV
132 POSIX2_FORT_RUN
133 POSIX2_LOCALEDEF
134 POSIX2_PBS
135 POSIX2_PBS_ACCOUNTING
136 POSIX2_PBS_LOCATE
137 POSIX2_PBS_MESSAGE
138 POSIX2_PBS_TRACK
139 POSIX2_SW_DEV
140 POSIX2_UPE
141 POSIX2_VERSION
142 _REGEX_VERSION
143 PAGE_SIZE
144 PAGESIZE
145 PTHREAD_DESTRUCTOR_ITERATIONS
146 PTHREAD_KEYS_MAX
147 PTHREAD_STACK_MIN
148 PTHREAD_THREADS_MAX
149 RE_DUP_MAX
150 RTSIG_MAX
151 SEM_NSEMS_MAX
152 SEM_VALUE_MAX
153 SIGQUEUE_MAX
154 STREAM_MAX
155 SYMLOOP_MAX
156 TIMER_MAX
157 TTY_NAME_MAX
158 TZNAME_MAX
159 _XBS5_ILP32_OFF32
160 _XBS5_ILP32_OFFBIG
161 _XBS5_LP64_OFF64
162 _XBS5_LPBIG_OFFBIG
163 _XOPEN_CRYPT
164 _XOPEN_ENH_I18N
165 _XOPEN_LEGACY
166 _XOPEN_REALTIME
167 _XOPEN_REALTIME_THREADS
168 _XOPEN_SHM
169 _XOPEN_UNIX
170 _XOPEN_VERSION
171 _XOPEN_XCU_VERSION
172 PATH
173 POSIX_V6_ILP32_OFF32_CFLAGS
174 POSIX_V6_ILP32_OFF32_LDFLAGS
175 POSIX_V6_ILP32_OFF32_LIBS
176 POSIX_V6_ILP32_OFF32_LINTFLAGS
177 POSIX_V6_ILP32_OFFBIG_CFLAGS
178 POSIX_V6_ILP32_OFFBIG_LDFLAGS
179 POSIX_V6_ILP32_OFFBIG_LIBS
180 POSIX_V6_ILP32_OFFBIG_LINTFLAGS
181 POSIX_V6_LP64_OFF64_CFLAGS
182 POSIX_V6_LP64_OFF64_LDFLAGS
183 POSIX_V6_LP64_OFF64_LIBS
184 POSIX_V6_LP64_OFF64_LINTFLAGS
185 POSIX_V6_LPBIG_OFFBIG_CFLAGS
186 POSIX_V6_LPBIG_OFFBIG_LDFLAGS
187 POSIX_V6_LPBIG_OFFBIG_LIBS
188 POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
189 XBS5_ILP32_OFF32_CFLAGS
190 XBS5_ILP32_OFF32_LDFLAGS
191 XBS5_ILP32_OFF32_LIBS
192 XBS5_ILP32_OFF32_LINTFLAGS
193 XBS5_ILP32_OFFBIG_CFLAGS
194 XBS5_ILP32_OFFBIG_LDFLAGS
195 XBS5_ILP32_OFFBIG_LIBS
196 XBS5_ILP32_OFFBIG_LINTFLAGS
197 XBS5_LP64_OFF64_CFLAGS
198 XBS5_LP64_OFF64_LDFLAGS
199 XBS5_LP64_OFF64_LIBS
200 XBS5_LP64_OFF64_LINTFLAGS
201 XBS5_LPBIG_OFFBIG_CFLAGS
202 XBS5_LPBIG_OFFBIG_LDFLAGS
203 XBS5_LPBIG_OFFBIG_LIBS
204 XBS5_LPBIG_OFFBIG_LINTFLAGS
207 while read name; do
208 printf %s "getconf $name /: " >> $logfile
209 ${run_getconf} "$name" / < /dev/null 2>> $logfile >> $logfile
210 if test $? -ne 0; then
211 echo "*** $name FAILED" >> $logfile
212 result=1
214 done <<EOF
215 FILESIZEBITS
216 LINK_MAX
217 MAX_CANON
218 MAX_INPUT
219 NAME_MAX
220 PATH_MAX
221 PIPE_BUF
222 POSIX_ALLOC_SIZE_MIN
223 POSIX_REC_INCR_XFER_SIZE
224 POSIX_REC_MAX_XFER_SIZE
225 POSIX_REC_MIN_XFER_SIZE
226 POSIX_REC_XFER_ALIGN
227 SYMLINK_MAX
228 _POSIX_CHOWN_RESTRICTED
229 _POSIX_NO_TRUNC
230 _POSIX_VDISABLE
231 _POSIX_ASYNC_IO
232 _POSIX_PRIO_IO
233 _POSIX_SYNC_IO
236 exit $result
238 # Preserve executable bits for this shell script.
239 Local Variables:
240 eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
241 eval:(make-local-variable 'file-mode)
242 eval:(setq file-mode (file-modes (buffer-file-name)))
243 eval:(make-local-variable 'after-save-hook)
244 eval:(add-hook 'after-save-hook 'frobme)
245 End: