{"action":"opened","issue":{"url":"https://api.github.com/repos/mdlewisfb/OpenCellular/issues/10","repository_url":"https://api.github.com/repos/mdlewisfb/OpenCellular","labels_url":"https://api.github.com/repos/mdlewisfb/OpenCellular/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/mdlewisfb/OpenCellular/issues/10/comments","events_url":"https://api.github.com/repos/mdlewisfb/OpenCellular/issues/10/events","html_url":"https://github.com/mdlewisfb/OpenCellular/issues/10","id":372057566,"node_id":"MDU6SXNzdWUzNzIwNTc1NjY=","number":10,"title":"Test_ltc4275 update_status() Fails","user":{"login":"mdlewisfb","id":18127350,"node_id":"MDQ6VXNlcjE4MTI3MzUw","avatar_url":"https://avatars1.githubusercontent.com/u/18127350?v=4","gravatar_id":"","url":"https://api.github.com/users/mdlewisfb","html_url":"https://github.com/mdlewisfb","followers_url":"https://api.github.com/users/mdlewisfb/followers","following_url":"https://api.github.com/users/mdlewisfb/following{/other_user}","gists_url":"https://api.github.com/users/mdlewisfb/gists{/gist_id}","starred_url":"https://api.github.com/users/mdlewisfb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdlewisfb/subscriptions","organizations_url":"https://api.github.com/users/mdlewisfb/orgs","repos_url":"https://api.github.com/users/mdlewisfb/repos","events_url":"https://api.github.com/users/mdlewisfb/events{/privacy}","received_events_url":"https://api.github.com/users/mdlewisfb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-19T17:58:41Z","updated_at":"2018-10-19T17:58:41Z","closed_at":null,"author_association":"OWNER","body":"Product: (OC-SDR, OC-LTE, OC-LTE, OC-Power, others)\r\nUnit Tests\r\n\r\nCategory: (Hardware, Software/stack, Firmware/bootloader, Documentation)\r\nSoftware/stack\r\n\r\nDescription\r\nDescribe the issue found\r\nIf the tests are run with -fshort-enums (due to issue #62), then test_ltc4275_update_status() fails.\r\n\r\nThe PDStatus_Info.state comparison is what is causing the test to fail (expect 0, but gets 1).\r\nThe PDStatus_Info.state should never have it's value changed with the current test setup, and so should end up 1 not 0. This is what happens when short-enums is flagged. When short-enums is not used, the assignment of the PDStatus_info.pdStatus.powerGoodStatus is assigning an int to a uint8_t value and this mismatch is overwriting the state value to be 0.\r\n\r\nAttached is the gdb trace of this showing line 190 on my system, but 191 in ltc4275,c as the line modifying the .state value, even though it is modifying the powerGoodStatus value.\r\nltc4275_test_fail_trace.txt\r\n\r\nPlease provide all necessary steps to reproduce the issue\r\nIn firmware/ec/test/Makefile add -fshort-enums flag to CFLAGS. Run make clean test TESTS='Test_ltc4275' (or all of them if desired) (reproduced on Windows Cygwin and Linux Ubuntu)"}}
{"actor":{"display_login":"mdlewisfb"}}