forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge master to rotating-id-generation #16
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…4640) * Simplify python environment configuration: - Add a build script that includes all of: - compile host python library - creates a virtual environment to use - installs WHL chip file - Updated instructions for building - sudo should not be required for installation (only running) and we should recommend virtual environment usage due to the requirement to clean the package - Added dependency to pygobject and six, removed dependency on pgi * Restyle fixes * Minor update to kick the restyle checker in github * Use `realpath` to output nicer paths and not use .. thoughout * Restyle fixes * Add instruction to ask for Ubuntu 20.10 instead of 20.04 for Raspberry pi * Restyle fixes
* Replace nl_Chip with pychip - I believe nl stands for NestLabs however within chip that has no meaning * Restyle fixes
Lack of comortable way to set CHIP_BYPASS_RENDEZVOUS value on the configuration level for nrfconnect. * Added Kconfig option allowing to set CHIP_BYPASS_RENDEZVOUS value from the configuration file.
…ying ZCL stack (#4661) * Update chip-tool to be a client application using ZAP * Disable clients clusters from the all-clusters-app zap config * Get src/darwin to push down command responses down into the ZCL stack. The above changes introduce a new callback based API for command responses instead of hand crafted code inside the iOS ChipTool application. * Map ZCL responses to command using sequence number identifier * Add nlio path to the esp32 all-clusters-app Co-authored-by: Justin Wood <[email protected]>
* First commit for BDX message utilities - establish directory for BDX - add BDXMessageUtils files - add unit tests for BDXMessageUtils - edit BUILD.gn files to build BDX directory and tests * First commit for BDX message utilities - establish directory for BDX - add BDXMessageUtils files - add unit tests for BDXMessageUtils - edit BUILD.gn files to build BDX directory and tests * move bdx directory to src/protocols * fix BufferReader usage, style mistakes * remove transport/bdx and fix build files * remove unused header * adding State files to BDX directory * First commit for BDX message utilities - establish directory for BDX - add BDXMessageUtils files - add unit tests for BDXMessageUtils - edit BUILD.gn files to build BDX directory and tests * move bdx directory to src/protocols * fix BufferReader usage, style mistakes * First commit for BDX message utilities - establish directory for BDX - add BDXMessageUtils files - add unit tests for BDXMessageUtils - edit BUILD.gn files to build BDX directory and tests * remove transport/bdx and fix build files * remove unused header * adding State files to BDX directory * WIP: integrating BdxMessages back into this branch * Redesign BdxTransferSession API around StartTransfer, WaitForTransfer * Delete old files BDXState + BDXMessageUtils * Implementation for StartTransfer and unit test * write full exchange test up to first BlockQuery - add test logic for exchange up to first BlockQuery message (failing here) - fix virtual destructor errors - add helper method for writing BDX messages to packetbuffer * add methods for verifying transfer control options also add delegate methods for file descriptor and metadata * Full overhaul of TransferSession using EmitOutput() also includes two tests for receiver drive and sender drive * rename MessageType enum values * remove reference to kProtocol_StatusReport and add TODO * remove accidental change to src/BUILD.gn * fix accidental third party repo changes * restyling * fix struct initialization compiler errors * QEMU compilation fix * initialize anonymous union to fix -Werror=uninitialized * replace std::move() calls with Retain(), fix OutputEvent initialization * remove brace-enclosed initializer lists * replace Retain() with std::move() when possible * Address comments from Tennessee: - lowercase bdx namespace - remove PrepareBlockAckEOF and combine in PrepareBlockAck - add test helper for verifying output message type - change test metadata to TLV format * add checks for invalid AcceptTransfer data and add tests * fix build after merge * add check for transfer timeout, add timestamps to API, add timeout test * fix build: add SystemPacketBuffer.h include * change NewWithAvailableSize() -> New() * add helper test function VerifyNoMoreOutput() * fix block counter tracking, add test conditions for counters - also add test helper SendAndVerifyTransferInit * change OutputEventFlags (bitfield) to OutputEventType (flat enum) * Update src/protocols/bdx/BdxTransferSession.h Co-authored-by: Tennessee Carmel-Veilleux <[email protected]> * use strlen instead of sizeof * use and enforce metadata with top-level list (path) * add BdxMessage struct interface for common method calls * change kTLVType_Path to _List * addressing many of Tennessee's comments: - rename remove Output from kOutput_ enums - add AvailableDataLength() check when writing message to buffer - fix timeout check - fix payloadHeader.Encode() call, use headerSize * remove "State_" prefix from TransferStates enum - also rename from Idle to Unititalized * rename TransferStates -> TransferState * restyling: whitespace * Use PacketBufBound instead of PacketBufferHandle::New() * Implement StatusReport handling and sending with tests * implement AbortTransfer() and update comments related to StatusReport * combine vendorID and profileID in StatusReport handling Co-authored-by: Justin Wood <[email protected]> Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>
* Initial stab * Updating based on feedback * Oops, missing ,
…ata. (#4689) We are mixing placement new with Clear() calls and no destructor calls, and in some cases (ChipCertificateSet::Release) doing neither clearing nor destruction. Instead, try to consistently use ~ChipCertificateData when we are no longer keeping track of the relevant object. The addition of `Clear()` in `~ChipCertificateData` is both to match existing behavior and on the assumption that we don't want that data lying around in memory if not needed.
* Encapsulate message footer size requirement #### Problem Application-level code that allocates a packet buffer for a message of a particular size has to be aware that up to kMaxTagLength additional bytes may be necessary for the message authentication code. High-level code shouldn't need to be aware of this. #### Summary of Changes Added: - `chip::MessagePacketBuffer::New()` - `chip::MessagePacketBuffer::NewWithData()` - `chip::MessagePacketBuffer::HasFooterSpace()` Fixes #4666 - Hide low-level message authentication code requirements from high-level packet buffer allocation * fix doxymentation * check for overflow * typo
* Add Key Value Storage to ESP32 This is backed using the ESP32 NVM implementation, using the CHIP_KVS namespace. NVM does not support partial or offset reads, and so for now this is not supported in the KVS API. If needed support can be added in the future. * Add persistent storage example for ESP32
* Introduce concept of device administrator table - Store attributes provisioned by individual admins - Use these attributes to process packets on ingress and egress * fix doxygen * fix cirque tests failure * fix doxygen * Load secure session parameters before sending message to the device * fix rebase issue * try to fix cirque test * address review comments * update AdminPairingInfo description * Use config #define to declare max admins * review comments
* Remove BufBound #### Problem `BufBound` has been subsumed by `BufferWriter`. #### Summary of Changes Replace uses of `BufBound` with `LittleEndian::BufferWriter`, and remove `BufBound`. fixes #4029 - BufBound redundant, remove it * review * fix merge
* Remove unused code (that does not compile) for python log redirection * Fix typo
…4563) There is no build validation in CI for pigweed-app, as this app related builds are not ran in the github workflows. * Modified nrfconnect_example.sh to take board name as an mandatory argument and also allow passing list of additional arguments (e.g. attaching overlays). * Added pigweed-app build to the nrfconnect github workflows. * Renamed esp_echo_app.sh to the esp_example.sh and modified it to take application name as an argument. * Added pigweed-app build to the esp32 github workflow. * Renamed Echo App build step to the All Clusters App in the esp32 and qemu github workflows, as in fact that app is being build.
Error message was: "Default value for: manufacturerCodes/0x1002 does not match an option." manufacturers.xml now copied from the ZAP source tree to the CHIP source tree. Signed-off-by: Markus Becker <[email protected]>
* Implement the Pigweed-app example on EFR32 - Init uart driver and create function to read and write a character - link those functions with pigweed backend - move some files that can be shared for all EFR32 examples to efr32/platform - create GN build structure for pigweed usage with EFR32 platform Implement the Pigweed-app example on EFR32 - Init uart driver and create function to read and write a character - link those functions with pigweed backend - move some files that can be shared for all EFR32 examples to efr32/platform - create GN build structure for pigweed usage with EFR32 platform Change uart driver from uartdrv to retargetSerial, using the dma was causing issues reading with pigweed proto Cleanup in the build GN files Some cleanup for the build * Restyled by whitespace * Restyled by gn * Restyled by prettier-markdown * Fix the new symlink to be relative paths Change copyright to 2021 for new files * Restyled by gn * Move config cpp17 -> std_cpp17 to lib/pw_rpc/BUILD.gn so it can be use for all examples. That config is only used when pw_rpc is build Create a with_pw_rpc.gni file in efr examples. This gni file need to be imported in the build args when we will want to build a example with pw_rpc (this is still a WIP) This doesn't impact pigweed-app example because it always runs the pw_rpc * Restyled by gn Co-authored-by: Restyled.io <[email protected]>
* Remove CHIP retain logging - it does not seem to be used (not sure what IE tests are) * Remove more constants for log retaining * Fix typo in persistent storage
It looks like the Github backend used to include the HTTP status as an actual header, in addition to sending it as a status. But now they don't seem to be doing it. The difference between requestBlobAndCheck and requestBlob, looking at <https://github.com/PyGithub/PyGithub/blob/master/github/Requester.py>, is that the former calls requestBlob, then does JSON parsing on the body, checks that the status is not an error, then returns just the headers and response body to the caller. Since we do actually care about the status, and don't care about the response body and the JSON-decoding that requestBlobAndCheck does, we can just use requestBlob directly. That lets us examine the status in the way we want.
…liableMessageContext/ReliableMessageMgr (#4728)
* Enable pairing of multiple admins with a device * some code cleanup * Fix doxygen, and some code cleanup * fix conflicting namespace and class name for SetupPayload * fix build deps * fix Android build * add TODO for discriminator usage * address review comments
hnnajh
pushed a commit
that referenced
this pull request
Jul 22, 2022
It's not safe to access line editing state from the IO thread while inside readline() on the main thread. Remove the code that attempts to redraw readline after printing logs. This avoids segfaults during logging at the cost of those logs overwriting the prompt (this is not trivial to fix as readline is a blocking API). ================== WARNING: ThreadSanitizer: data race (pid=63005) Write of size 1 at 0x55f81c7745ff by main thread: #0 InteractiveStartCommand::ParseCommand(char*) ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 (chip-tool+0x874911) #1 InteractiveStartCommand::RunCommand() ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:85 (chip-tool+0x874594) #2 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:408 (chip-tool+0x83e478) #3 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839) #4 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7) #5 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288) #6 main <null> (chip-tool+0x569c0a) Previous read of size 1 at 0x55f81c7745ff by thread T5 (mutexes: write M185): #0 LoggingCallback ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:46 (chip-tool+0x874479) #1 chip::Logging::LogV(unsigned char, unsigned char, char const*, __va_list_tag*) ../../src/lib/support/logging/CHIPLogging.cpp:221 (chip-tool+0x8ee4dc) #2 chip::Logging::Log(unsigned char, unsigned char, char const*, ...) ../../src/lib/support/logging/CHIPLogging.cpp:172 (chip-tool+0x8ee30a) #3 chip::app::ReadClient::RefreshLivenessCheckTimer() <null> (chip-tool+0x8b1746) #4 chip::app::ReadClient::ProcessSubscribeResponse(chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:845 (chip-tool+0x8b20ec) #5 chip::app::ReadClient::OnMessageReceived(chip::Messaging::ExchangeContext*, chip::PayloadHeader const&, chip::System::PacketBufferHandle&&) ../../src/app/ReadClient.cpp:409 (chip-tool+0x8ae2a4) #6 chip::Messaging::ExchangeContext::HandleMessage(unsigned int, chip::PayloadHeader const&, chip::BitFlags<chip::Messaging::MessageFlagValues, unsigned int>, chip::System::PacketBufferHandle&&) <null> (chip-tool+0xa0517a) #7 operator()<chip::Messaging::ExchangeContext> ../../src/messaging/ExchangeMgr.cpp:219 (chip-tool+0xa08c73) #8 Call ../../src/lib/support/Pool.h:126 (chip-tool+0xa0912d) #9 chip::internal::HeapObjectList::ForEachNode(void*, chip::Loop (*)(void*, void*)) ../../src/lib/support/Pool.cpp:127 (chip-tool+0x8ee05a) #10 ForEachActiveObject<chip::Messaging::ExchangeManager::OnMessageReceived(const chip::PacketHeader&, const chip::PayloadHeader&, const chip::SessionHandle&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&)::<lambda(auto:2*)> > ../../src/lib/support/Pool.h:396 (chip-tool+0xa08d10) #11 chip::Messaging::ExchangeManager::OnMessageReceived(chip::PacketHeader const&, chip::PayloadHeader const&, chip::SessionHandle const&, chip::SessionMessageDelegate::DuplicateMessage, chip::System::PacketBufferHandle&&) ../../src/messaging/ExchangeMgr.cpp:212 (chip-tool+0xa07e91) #12 chip::SessionManager::SecureUnicastMessageDispatch(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:616 (chip-tool+0xa1548b) #13 chip::SessionManager::OnMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/SessionManager.cpp:443 (chip-tool+0xa14426) #14 chip::TransportMgrBase::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/TransportMgrBase.cpp:76 (chip-tool+0xa17dfa) #15 chip::Transport::Base::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) ../../src/transport/raw/Base.h:102 (chip-tool+0xb19728) #16 chip::Transport::UDP::OnUdpReceive(chip::Inet::UDPEndPoint*, chip::System::PacketBufferHandle&&, chip::Inet::IPPacketInfo const*) ../../src/transport/raw/UDP.cpp:122 (chip-tool+0xb1a48b) #17 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>) ../../src/inet/UDPEndPointImplSockets.cpp:688 (chip-tool+0xb00aa0) #18 chip::Inet::UDPEndPointImplSockets::HandlePendingIO(chip::BitFlags<chip::System::SocketEventFlags, unsigned char>, long) ../../src/inet/UDPEndPointImplSockets.cpp:569 (chip-tool+0xafff89) #19 chip::System::LayerImplSelect::HandleEvents() ../../src/system/SystemLayerImplSelect.cpp:406 (chip-tool+0xb07563) #20 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:181 (chip-tool+0x98a227) #21 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75) #22 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c) Location is global '(anonymous namespace)::gIsCommandRunning' of size 1 at 0x55f81c7745ff (chip-tool+0x000000c485ff) Mutex M185 (0x55f81c776180) created at: #0 pthread_mutex_lock ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4240 (libtsan.so.0+0x4f30a) #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_LockChipStack() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:78 (chip-tool+0x989e90) #2 chip::DeviceLayer::PlatformManager::LockChipStack() ../../src/include/platform/PlatformManager.h:410 (chip-tool+0x988fa5) #3 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:170 (chip-tool+0x98a147) #4 chip::DeviceLayer::PlatformManager::RunEventLoop() ../../src/include/platform/PlatformManager.h:362 (chip-tool+0x988f75) #5 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain(void*) ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:205 (chip-tool+0x98a87c) Thread T5 (tid=63013, running) created by main thread at: #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:969 (libtsan.so.0+0x5ad75) #1 chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_StartEventLoopTask() ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:231 (chip-tool+0x98a40a) #2 chip::DeviceLayer::PlatformManager::StartEventLoopTask() ../../src/include/platform/PlatformManager.h:375 (chip-tool+0xaacca2) #3 chip::Controller::DeviceControllerFactory::ServiceEvents() ../../src/controller/CHIPDeviceControllerFactory.cpp:331 (chip-tool+0xab0417) #4 CHIPCommand::StartWaiting(std::chrono::duration<unsigned int, std::ratio<1l, 1000l> >) ../../examples/chip-tool/commands/common/CHIPCommand.cpp:403 (chip-tool+0x83e353) #5 CHIPCommand::Run() ../../examples/chip-tool/commands/common/CHIPCommand.cpp:187 (chip-tool+0x83c839) #6 Commands::RunCommand(int, char**, bool) ../../examples/chip-tool/commands/common/Commands.cpp:147 (chip-tool+0x85d4f7) #7 Commands::Run(int, char**) ../../examples/chip-tool/commands/common/Commands.cpp:51 (chip-tool+0x85c288) #8 main <null> (chip-tool+0x569c0a) SUMMARY: ThreadSanitizer: data race ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:127 in InteractiveStartCommand::ParseCommand(char*) ==================
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
<<<<<FILL ME IN - the issue this PR is intended to address>>>>>
Summary of Changes
<<<<<FILL ME IN - what's in this PR>>>>>
Fixes #<<<<<FILL ME IN - issue number(s). If no issue, please create one>>>>>