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