@@ -5,150 +5,18 @@ Florian Anderiasch
55fa@php.net
66--SKIPIF--
77<?php
8- if (!extension_loaded ('sockets ' ) || ! function_exists ( ' socket_strerror ' )) {
9- die ('skip sockets extension not available. ' );
10- }
11- if (!stristr (PHP_OS , "Linux " )) {
12- die ('skip - test validates linux error strings only. ' );
13- }
8+ if (!extension_loaded ('sockets ' )) {
9+ die ('skip sockets extension not available. ' );
10+ }
11+ if (!stristr (PHP_OS , "Linux " )) {
12+ die ('skip - test validates linux error strings only. ' );
13+ }
1414?>
1515--FILE--
1616<?php
17- for ( $ i = 0 ; $ i <= 132 ; $ i ++) {
18- var_dump ( socket_strerror ( $ i ));
19- }
17+ /* Only test one representative error code here,
18+ * as messages will differ depending on the used libc. */
19+ var_dump ( socket_strerror ( 1 ));
2020?>
21- --EXPECTF--
22- string(7) "Success"
21+ --EXPECT--
2322string(23) "Operation not permitted"
24- string(25) "No such file or directory"
25- string(15) "No such process"
26- string(23) "Interrupted system call"
27- string(18) "Input/output error"
28- string(25) "No such device or address"
29- string(22) "Argument list too long"
30- string(17) "Exec format error"
31- string(19) "Bad file descriptor"
32- string(18) "No child processes"
33- string(32) "Resource temporarily unavailable"
34- string(22) "Cannot allocate memory"
35- string(17) "Permission denied"
36- string(11) "Bad address"
37- string(21) "Block device required"
38- string(23) "Device or resource busy"
39- string(11) "File exists"
40- string(25) "Invalid cross-device link"
41- string(14) "No such device"
42- string(15) "Not a directory"
43- string(14) "Is a directory"
44- string(16) "Invalid argument"
45- string(29) "Too many open files in system"
46- string(19) "Too many open files"
47- string(30) "Inappropriate ioctl for device"
48- string(14) "Text file busy"
49- string(14) "File too large"
50- string(23) "No space left on device"
51- string(12) "Illegal seek"
52- string(21) "Read-only file system"
53- string(14) "Too many links"
54- string(11) "Broken pipe"
55- string(32) "Numerical argument out of domain"
56- string(29) "Numerical result out of range"
57- string(25) "Resource deadlock avoided"
58- string(18) "File name too long"
59- string(18) "No locks available"
60- string(24) "Function not implemented"
61- string(19) "Directory not empty"
62- string(33) "Too many levels of symbolic links"
63- string(16) "Unknown error 41"
64- string(26) "No message of desired type"
65- string(18) "Identifier removed"
66- string(27) "Channel number out of range"
67- string(24) "Level 2 not synchronized"
68- string(14) "Level 3 halted"
69- string(13) "Level 3 reset"
70- string(24) "Link number out of range"
71- string(28) "Protocol driver not attached"
72- string(26) "No CSI structure available"
73- string(14) "Level 2 halted"
74- string(16) "Invalid exchange"
75- string(26) "Invalid request descriptor"
76- string(13) "Exchange full"
77- string(8) "No anode"
78- string(20) "Invalid request code"
79- string(12) "Invalid slot"
80- string(%d) "%s"
81- string(20) "Bad font file format"
82- string(19) "Device not a stream"
83- string(17) "No data available"
84- string(13) "Timer expired"
85- string(24) "Out of streams resources"
86- string(29) "Machine is not on the network"
87- string(21) "Package not installed"
88- string(16) "Object is remote"
89- string(21) "Link has been severed"
90- string(15) "Advertise error"
91- string(13) "Srmount error"
92- string(27) "Communication error on send"
93- string(14) "Protocol error"
94- string(18) "Multihop attempted"
95- string(18) "RFS specific error"
96- string(11) "Bad message"
97- string(37) "Value too large for defined data type"
98- string(26) "Name not unique on network"
99- string(28) "File descriptor in bad state"
100- string(22) "Remote address changed"
101- string(38) "Can not access a needed shared library"
102- string(36) "Accessing a corrupted shared library"
103- string(31) ".lib section in a.out corrupted"
104- string(47) "Attempting to link in too many shared libraries"
105- string(37) "Cannot exec a shared library directly"
106- string(49) "Invalid or incomplete multibyte or wide character"
107- string(43) "Interrupted system call should be restarted"
108- string(18) "Streams pipe error"
109- string(14) "Too many users"
110- string(30) "Socket operation on non-socket"
111- string(28) "Destination address required"
112- string(16) "Message too long"
113- string(30) "Protocol wrong type for socket"
114- string(22) "Protocol not available"
115- string(22) "Protocol not supported"
116- string(25) "Socket type not supported"
117- string(23) "Operation not supported"
118- string(29) "Protocol family not supported"
119- string(40) "Address family not supported by protocol"
120- string(22) "Address already in use"
121- string(31) "Cannot assign requested address"
122- string(15) "Network is down"
123- string(22) "Network is unreachable"
124- string(35) "Network dropped connection on reset"
125- string(32) "Software caused connection abort"
126- string(24) "Connection reset by peer"
127- string(25) "No buffer space available"
128- string(39) "Transport endpoint is already connected"
129- string(35) "Transport endpoint is not connected"
130- string(45) "Cannot send after transport endpoint shutdown"
131- string(34) "Too many references: cannot splice"
132- string(20) "Connection timed out"
133- string(18) "Connection refused"
134- string(12) "Host is down"
135- string(16) "No route to host"
136- string(29) "Operation already in progress"
137- string(25) "Operation now in progress"
138- string(%d) "Stale%sfile handle"
139- string(24) "Structure needs cleaning"
140- string(27) "Not a XENIX named type file"
141- string(29) "No XENIX semaphores available"
142- string(20) "Is a named type file"
143- string(16) "Remote I/O error"
144- string(19) "Disk quota exceeded"
145- string(15) "No medium found"
146- string(17) "Wrong medium type"
147- string(18) "Operation canceled"
148- string(26) "Required key not available"
149- string(15) "Key has expired"
150- string(20) "Key has been revoked"
151- string(27) "Key was rejected by service"
152- string(10) "Owner died"
153- string(21) "State not recoverable"
154- string(%d) "%s"
0 commit comments