{"action":"opened","issue":{"url":"https://api.github.com/repos/nanomsg/nng/issues/610","repository_url":"https://api.github.com/repos/nanomsg/nng","labels_url":"https://api.github.com/repos/nanomsg/nng/issues/610/labels{/name}","comments_url":"https://api.github.com/repos/nanomsg/nng/issues/610/comments","events_url":"https://api.github.com/repos/nanomsg/nng/issues/610/events","html_url":"https://github.com/nanomsg/nng/issues/610","id":345630106,"node_id":"MDU6SXNzdWUzNDU2MzAxMDY=","number":610,"title":"Dealing with NNG_ENOTSUP in socket.c","user":{"login":"ProfFan","id":5358374,"node_id":"MDQ6VXNlcjUzNTgzNzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5358374?v=4","gravatar_id":"","url":"https://api.github.com/users/ProfFan","html_url":"https://github.com/ProfFan","followers_url":"https://api.github.com/users/ProfFan/followers","following_url":"https://api.github.com/users/ProfFan/following{/other_user}","gists_url":"https://api.github.com/users/ProfFan/gists{/gist_id}","starred_url":"https://api.github.com/users/ProfFan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProfFan/subscriptions","organizations_url":"https://api.github.com/users/ProfFan/orgs","repos_url":"https://api.github.com/users/ProfFan/repos","events_url":"https://api.github.com/users/ProfFan/events{/privacy}","received_events_url":"https://api.github.com/users/ProfFan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-30T06:42:06Z","updated_at":"2018-07-30T06:42:06Z","closed_at":null,"author_association":"NONE","body":"Note that by filing an issue, you agree that you have read and agreed to\r\nour contribution guidelines.\r\n\r\n## NNG & Platform details.\r\n\r\nmaster ccc24a8, macOS 10.13.4\r\n\r\n## Expected Behavior\r\n\r\n`pubsub` and `pair1` tests should not fail.\r\n\r\n## Actual Behavior\r\n\r\n`pubsub` and `pair1` tests failed.\r\n\r\n## Steps to Reproduce\r\n\r\n```\r\ncmake .. -DNNG_ENABLE_HTTP=OFF -DNNG_ENABLE_TLS=OFF -DNNG_PROTO_BUS0=OFF -DNNG_PROTO_PAIR0=ON -DNNG_PROTO_PULL0=OFF -DNNG_PROTO_PUSH0=OFF -DNNG_PROTO_REP0=OFF  -DNNG_PROTO_REQ0=OFF -DNNG_PROTO_RESPONDENT0=OFF -DNNG_PROTO_SURVEYOR0=OFF -DNNG_TRANSPORT_IPC=OFF -DNNG_TRANSPORT_TCP=OFF -DNNG_TRANSPORT_WS=OFF\r\nmake -j\r\nmake test\r\n```\r\n\r\n## Dirty Solution\r\n\r\nChange `socket.c` at line 495:\r\n\r\n```\r\n\t    ((rv = nni_sock_setopt(s, NNG_OPT_RECVMAXSZ, &s->s_rcvmaxsz,\r\n\t          sizeof(size_t), NNI_TYPE_SIZE)) != 0)) {\r\n\t\tsock_destroy(s);\r\n\t\treturn (rv);\r\n\t}\r\n```\r\nTo:\r\n```\r\n\t    ((rv = nni_sock_setopt(s, NNG_OPT_RECVMAXSZ, &s->s_rcvmaxsz,\r\n\t          sizeof(size_t), NNI_TYPE_SIZE)) != 0)) {\r\n            if(rv != NNG_ENOTSUP){\r\n                sock_destroy(s);\r\n                return (rv);\r\n            } else {\r\n                rv = 0;\r\n            }\r\n\t}\r\n```\r\n\r\n### Before\r\n\r\n```\r\n54% tests passed, 17 tests failed out of 37\r\n\r\nTotal Test time (real) =   4.46 sec\r\n\r\nThe following tests FAILED:\r\n\t  1 - aio (Failed)\r\n\t  2 - bufsz (Failed)\r\n\t  3 - device (Failed)\r\n\t 10 - multistress (Child aborted)\r\n\t 15 - pollfd (Failed)\r\n\t 18 - scalability (SEGFAULT)\r\n\t 19 - sock (Failed)\r\n\t 21 - transport (Failed)\r\n\t 24 - pair1 (Failed)\r\n\t 25 - pubsub (Failed)\r\n\t 26 - cplusplus_pair (Child aborted)\r\n\t 27 - inproc_lat (Failed)\r\n\t 28 - inproc_thr (Failed)\r\n\t 29 - nngcat_async (Failed)\r\n\t 35 - nngcat_pubsub (Failed)\r\n\t 36 - nngcat_recvmaxsz (Failed)\r\n\t 37 - nngcat_unlimited (Failed)\r\nErrors while running CTest\r\nmake: *** [test] Error 8\r\n```\r\n\r\n### After\r\n\r\n```\r\n78% tests passed, 8 tests failed out of 37\r\n\r\nTotal Test time (real) =  11.50 sec\r\n\r\nThe following tests FAILED:\r\n\t 10 - multistress (SEGFAULT)\r\n\t 18 - scalability (SEGFAULT)\r\n\t 19 - sock (Failed)\r\n\t 21 - transport (Failed)\r\n\t 29 - nngcat_async (Failed)\r\n\t 35 - nngcat_pubsub (Failed)\r\n\t 36 - nngcat_recvmaxsz (Failed)\r\n\t 37 - nngcat_unlimited (Failed)\r\nErrors while running CTest\r\nmake: *** [test] Error 8\r\n```"}}
{"actor":{"display_login":"ProfFan"}}