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