Annotation of embedaddon/php/ext/sockets/tests/socket_strerror.phpt, revision 1.1

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>