ARM: Disable compat mcount code when unneeded.
[glibc.git] / posix / tst-getconf.sh
blob1cbebc5b68910918b9699b3c40a81646852f47a1
1 #! /bin/sh
2 # Test for getconf(1).
3 # Copyright (C) 2001-2014 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 # Since we use `sort' we must make sure to use the same locale everywhere.
28 LC_ALL=C
29 export LC_ALL
30 LANG=C
31 export LANG
33 rm -f $logfile
34 result=0
35 while read name; do
36 echo -n "getconf $name: " >> $logfile
37 ${run_getconf} "$name" < /dev/null 2>> $logfile >> $logfile
38 if test $? -ne 0; then
39 echo "*** $name FAILED" >> $logfile
40 result=1
42 done <<EOF
43 AIO_LISTIO_MAX
44 AIO_MAX
45 AIO_PRIO_DELTA_MAX
46 ARG_MAX
47 ATEXIT_MAX
48 BC_BASE_MAX
49 BC_DIM_MAX
50 BC_SCALE_MAX
51 BC_STRING_MAX
52 CHILD_MAX
53 COLL_WEIGHTS_MAX
54 DELAYTIMER_MAX
55 EXPR_NEST_MAX
56 HOST_NAME_MAX
57 IOV_MAX
58 LINE_MAX
59 LOGIN_NAME_MAX
60 NGROUPS_MAX
61 MQ_OPEN_MAX
62 MQ_PRIO_MAX
63 OPEN_MAX
64 _POSIX_ADVISORY_INFO
65 _POSIX_BARRIERS
66 _POSIX_ASYNCHRONOUS_IO
67 _POSIX_BASE
68 _POSIX_C_LANG_SUPPORT
69 _POSIX_C_LANG_SUPPORT_R
70 _POSIX_CLOCK_SELECTION
71 _POSIX_CPUTIME
72 _POSIX_DEVICE_IO
73 _POSIX_DEVICE_SPECIFIC
74 _POSIX_DEVICE_SPECIFIC_R
75 _POSIX_FD_MGMT
76 _POSIX_FIFO
77 _POSIX_FILE_ATTRIBUTES
78 _POSIX_FILE_LOCKING
79 _POSIX_FILE_SYSTEM
80 _POSIX_FSYNC
81 _POSIX_JOB_CONTROL
82 _POSIX_MAPPED_FILES
83 _POSIX_MEMLOCK
84 _POSIX_MEMLOCK_RANGE
85 _POSIX_MEMORY_PROTECTION
86 _POSIX_MESSAGE_PASSING
87 _POSIX_MONOTONIC_CLOCK
88 _POSIX_MULTI_PROCESS
89 _POSIX_NETWORKING
90 _POSIX_PIPE
91 _POSIX_PRIORITIZED_IO
92 _POSIX_PRIORITY_SCHEDULING
93 _POSIX_READER_WRITER_LOCKS
94 _POSIX_REALTIME_SIGNALS
95 _POSIX_REGEXP
96 _POSIX_SAVED_IDS
97 _POSIX_SEMAPHORES
98 _POSIX_SHARED_MEMORY_OBJECTS
99 _POSIX_SHELL
100 _POSIX_SIGNALS
101 _POSIX_SINGLE_PROCESS
102 _POSIX_SPAWN
103 _POSIX_SPIN_LOCKS
104 _POSIX_SPORADIC_SERVER
105 _POSIX_SYNCHRONIZED_IO
106 _POSIX_SYSTEM_DATABASE
107 _POSIX_SYSTEM_DATABASE_R
108 _POSIX_THREAD_ATTR_STACKADDR
109 _POSIX_THREAD_ATTR_STACKSIZE
110 _POSIX_THREAD_CPUTIME
111 _POSIX_THREAD_PRIO_INHERIT
112 _POSIX_THREAD_PRIO_PROTECT
113 _POSIX_THREAD_PRIORITY_SCHEDULING
114 _POSIX_THREAD_PROCESS_SHARED
115 _POSIX_THREAD_SAFE_FUNCTIONS
116 _POSIX_THREAD_SPORADIC_SERVER
117 _POSIX_THREADS
118 _POSIX_TIMEOUTS
119 _POSIX_TIMERS
120 _POSIX_TRACE
121 _POSIX_TRACE_EVENT_FILTER
122 _POSIX_TRACE_INHERIT
123 _POSIX_TRACE_LOG
124 _POSIX_TYPED_MEMORY_OBJECTS
125 _POSIX_USER_GROUPS
126 _POSIX_USER_GROUPS_R
127 _POSIX_VERSION
128 _POSIX_V6_ILP32_OFF32
129 _POSIX_V6_ILP32_OFFBIG
130 _POSIX_V6_LP64_OFF64
131 _POSIX_V6_LPBIG_OFFBIG
132 _POSIX_V6_WIDTH_RESTRICTED_ENVS
133 POSIX2_C_BIND
134 POSIX2_C_DEV
135 POSIX2_C_VERSION
136 POSIX2_CHAR_TERM
137 POSIX2_FORT_DEV
138 POSIX2_FORT_RUN
139 POSIX2_LOCALEDEF
140 POSIX2_PBS
141 POSIX2_PBS_ACCOUNTING
142 POSIX2_PBS_LOCATE
143 POSIX2_PBS_MESSAGE
144 POSIX2_PBS_TRACK
145 POSIX2_SW_DEV
146 POSIX2_UPE
147 POSIX2_VERSION
148 _REGEX_VERSION
149 PAGE_SIZE
150 PAGESIZE
151 PTHREAD_DESTRUCTOR_ITERATIONS
152 PTHREAD_KEYS_MAX
153 PTHREAD_STACK_MIN
154 PTHREAD_THREADS_MAX
155 RE_DUP_MAX
156 RTSIG_MAX
157 SEM_NSEMS_MAX
158 SEM_VALUE_MAX
159 SIGQUEUE_MAX
160 STREAM_MAX
161 SYMLOOP_MAX
162 TIMER_MAX
163 TTY_NAME_MAX
164 TZNAME_MAX
165 _XBS5_ILP32_OFF32
166 _XBS5_ILP32_OFFBIG
167 _XBS5_LP64_OFF64
168 _XBS5_LPBIG_OFFBIG
169 _XOPEN_CRYPT
170 _XOPEN_ENH_I18N
171 _XOPEN_LEGACY
172 _XOPEN_REALTIME
173 _XOPEN_REALTIME_THREADS
174 _XOPEN_SHM
175 _XOPEN_UNIX
176 _XOPEN_VERSION
177 _XOPEN_XCU_VERSION
178 PATH
179 POSIX_V6_ILP32_OFF32_CFLAGS
180 POSIX_V6_ILP32_OFF32_LDFLAGS
181 POSIX_V6_ILP32_OFF32_LIBS
182 POSIX_V6_ILP32_OFF32_LINTFLAGS
183 POSIX_V6_ILP32_OFFBIG_CFLAGS
184 POSIX_V6_ILP32_OFFBIG_LDFLAGS
185 POSIX_V6_ILP32_OFFBIG_LIBS
186 POSIX_V6_ILP32_OFFBIG_LINTFLAGS
187 POSIX_V6_LP64_OFF64_CFLAGS
188 POSIX_V6_LP64_OFF64_LDFLAGS
189 POSIX_V6_LP64_OFF64_LIBS
190 POSIX_V6_LP64_OFF64_LINTFLAGS
191 POSIX_V6_LPBIG_OFFBIG_CFLAGS
192 POSIX_V6_LPBIG_OFFBIG_LDFLAGS
193 POSIX_V6_LPBIG_OFFBIG_LIBS
194 POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
195 XBS5_ILP32_OFF32_CFLAGS
196 XBS5_ILP32_OFF32_LDFLAGS
197 XBS5_ILP32_OFF32_LIBS
198 XBS5_ILP32_OFF32_LINTFLAGS
199 XBS5_ILP32_OFFBIG_CFLAGS
200 XBS5_ILP32_OFFBIG_LDFLAGS
201 XBS5_ILP32_OFFBIG_LIBS
202 XBS5_ILP32_OFFBIG_LINTFLAGS
203 XBS5_LP64_OFF64_CFLAGS
204 XBS5_LP64_OFF64_LDFLAGS
205 XBS5_LP64_OFF64_LIBS
206 XBS5_LP64_OFF64_LINTFLAGS
207 XBS5_LPBIG_OFFBIG_CFLAGS
208 XBS5_LPBIG_OFFBIG_LDFLAGS
209 XBS5_LPBIG_OFFBIG_LIBS
210 XBS5_LPBIG_OFFBIG_LINTFLAGS
213 while read name; do
214 echo -n "getconf $name /: " >> $logfile
215 ${run_getconf} "$name" / < /dev/null 2>> $logfile >> $logfile
216 if test $? -ne 0; then
217 echo "*** $name FAILED" >> $logfile
218 result=1
220 done <<EOF
221 FILESIZEBITS
222 LINK_MAX
223 MAX_CANON
224 MAX_INPUT
225 NAME_MAX
226 PATH_MAX
227 PIPE_BUF
228 POSIX_ALLOC_SIZE_MIN
229 POSIX_REC_INCR_XFER_SIZE
230 POSIX_REC_MAX_XFER_SIZE
231 POSIX_REC_MIN_XFER_SIZE
232 POSIX_REC_XFER_ALIGN
233 SYMLINK_MAX
234 _POSIX_CHOWN_RESTRICTED
235 _POSIX_NO_TRUNC
236 _POSIX_VDISABLE
237 _POSIX_ASYNC_IO
238 _POSIX_PRIO_IO
239 _POSIX_SYNC_IO
242 exit $result
244 # Preserve executable bits for this shell script.
245 Local Variables:
246 eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
247 eval:(make-local-variable 'file-mode)
248 eval:(setq file-mode (file-modes (buffer-file-name)))
249 eval:(make-local-variable 'after-save-hook)
250 eval:(add-hook 'after-save-hook 'frobme)
251 End: