Skip to content

Commit

Permalink
Replace some pwbug/### TODOs with b/###
Browse files Browse the repository at this point in the history
Change-Id: I66097ff01d206caf6e6b87e07315645037627b0c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/100461
Pigweed-Auto-Submit: Rob Mohr <[email protected]>
Reviewed-by: Keir Mierle <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
  • Loading branch information
mohrr authored and CQ Bot Account committed Jun 29, 2022
1 parent 26c7a13 commit 0daafcc
Show file tree
Hide file tree
Showing 37 changed files with 130 additions and 125 deletions.
4 changes: 2 additions & 2 deletions pw_allocator/py/pw_allocator/heap_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def visualize(dump_file=None,
poison_enabled=False,
pointer_size=4):
"""Visualization of heap usage."""
# TODO(pwbug/236): Add standarized mechanisms to produce dump file and read
# heap information from dump file.
# TODO(b/235282507): Add standarized mechanisms to produce dump file and
# read heap information from dump file.
aligned_bytes = pointer_size
header_size = pointer_size * 2

Expand Down
2 changes: 1 addition & 1 deletion pw_assert/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pw_facade("assert") {
# compatibility with pw_assert's previous C-symbol based API.
#
# Warning: The assert facade is in a transitional state, and this target is
# likely to be removed as the pw_assert API is reassessed. (pwbug/246)
# likely to be removed as the pw_assert API is reassessed. (b/235149326)
pw_source_set("assert_compatibility_backend") {
public_configs = [ ":assert_backend_overrides" ]
public_deps = [ dir_pw_preprocessor ]
Expand Down
2 changes: 1 addition & 1 deletion pw_assert/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pw_add_facade(pw_assert.check
)

# Warning: The assert facade is in a transitional state, and this target is
# likely to be removed as the pw_assert API is reassessed. (pwbug/246)
# likely to be removed as the pw_assert API is reassessed. (b/235149326)
pw_add_module_library(pw_assert.assert_compatibility_backend
HEADERS
assert_compatibility_public_overrides/pw_assert_backend/assert_backend.h
Expand Down
2 changes: 1 addition & 1 deletion pw_assert/backend.gni
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ declare_args() {
# Backend for the pw_assert module's ASSERT facade.
#
# Warning: This naming is transitional. Modifying this build argument WILL
# result in future breakages. (pwbug/246)
# result in future breakages. (b/235149326)
pw_assert_LITE_BACKEND = "${dir_pw_assert}:assert_compatibility_backend"
}
2 changes: 1 addition & 1 deletion pw_assert_basic/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pw_facade("handler") {
public = [ "public/pw_assert_basic/handler.h" ]
}

# TODO(pwbug/246): This backend implements pw_assert's check backend and the
# TODO(b/235149326): This backend implements pw_assert's check backend and the
# temporary compatibility C ABI (pw_assert_HandleFailure()).
#
# pw_assert_basic only provides the backend's interface. The implementation is
Expand Down
2 changes: 1 addition & 1 deletion pw_assert_basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pw_add_facade(pw_assert_basic.handler
pw_preprocessor
)

# TODO(pwbug/246): This backend implements pw_assert's check backend and the
# TODO(b/235149326): This backend implements pw_assert's check backend and the
# temporary compatibility C ABI (pw_assert_HandleFailure()).
pw_add_module_library(pw_assert_basic.check_backend
HEADERS
Expand Down
4 changes: 2 additions & 2 deletions pw_assert_log/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ pw_source_set("check_backend") {
"$dir_pw_preprocessor",
]
sources = [
# TODO(pwbug/246): assert_log.cc implements the assert compatibility
# TODO(b/235149326): assert_log.cc implements the assert compatibility
# backend, but nothing for check_backend.
"assert_log.cc",
"public/pw_assert_log/check_log.h",
]
}

# TODO(pwbug/246): Remove this deprecated alias.
# TODO(b/235149326): Remove this deprecated alias.
group("pw_assert_log") {
public_deps = [ ":check_backend" ]
}
Expand Down
2 changes: 1 addition & 1 deletion pw_assert_zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if(NOT CONFIG_PIGWEED_ASSERT)
return()
endif()

# TODO(pwbug/246): This backend implements pw_assert's check backend and the
# TODO(b/235149326): This backend implements pw_assert's check backend and the
# temporary compatibility C ABI (pw_assert_HandleFailure()).
pw_auto_add_simple_module(pw_assert_zephyr
IMPLEMENTS_FACADE
Expand Down
4 changes: 2 additions & 2 deletions pw_chrono_embos/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pw_cc_library(
"//pw_chrono:system_clock",
"//pw_function",
"//pw_chrono:system_timer_facade",
# TODO(pwbug/317): This should depend on embOS but our third parties
# TODO(b/234876414): This should depend on embOS but our third parties
# currently do not have Bazel support.
],
)
Expand All @@ -87,7 +87,7 @@ pw_cc_library(
":system_clock",
"//pw_assert",
"//pw_interrupt:context",
# TODO(pwbug/317): This should depend on embOS but our third parties
# TODO(b/234876414): This should depend on embOS but our third parties
# currently do not have Bazel support.
],
)
4 changes: 2 additions & 2 deletions pw_chrono_freertos/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pw_cc_library(
"//pw_chrono:system_clock",
"//pw_function",
"//pw_chrono:system_timer_facade",
# TODO(pwbug/317): This should depend on FreeRTOS but our third parties
# TODO(b/234876414): This should depend on FreeRTOS but our third parties
# currently do not have Bazel support.
],
)
Expand All @@ -88,7 +88,7 @@ pw_cc_library(
"//pw_chrono:system_timer_facade",
":system_clock",
"//pw_assert",
# TODO(pwbug/317): This should depend on FreeRTOS but our third parties
# TODO(b/234876414): This should depend on FreeRTOS but our third parties
# currently do not have Bazel support.
],
)
2 changes: 1 addition & 1 deletion pw_kvs/public/pw_kvs/flash_memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class FlashMemory {
// The flash address is in the range of: 0 to FlashSize.
typedef uint32_t Address;

// TODO(pwbug/246): This can be constexpr when tokenized asserts are fixed.
// TODO(b/235149326): This can be constexpr when tokenized asserts are fixed.
FlashMemory(size_t sector_size,
size_t sector_count,
size_t alignment,
Expand Down
2 changes: 1 addition & 1 deletion pw_protobuf/public/pw_protobuf/internal/codegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class MessageField {
uint32_t field_number_;
uint32_t field_info_;
size_t field_offset_;
// TODO(pwbug/649): Could be replaced by a class MessageDescriptor*
// TODO(b/234875722): Could be replaced by a class MessageDescriptor*
const span<const MessageField>* nested_message_fields_;
};
static_assert(sizeof(MessageField) <= sizeof(size_t) * 4,
Expand Down
2 changes: 1 addition & 1 deletion pw_rpc/channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace pw::rpc {
namespace {

// TODO(pwbug/615): Dynamically allocate this buffer if
// TODO(b/234876617): Dynamically allocate this buffer if
// PW_RPC_DYNAMIC_ALLOCATION is enabled.
std::array<std::byte, cfg::kEncodingBufferSizeBytes> encoding_buffer
PW_GUARDED_BY(internal::rpc_lock());
Expand Down
6 changes: 3 additions & 3 deletions pw_rpc/endpoint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ void Endpoint::RegisterCall(Call& call) {
RegisterUniqueCall(call);

if (existing_call != nullptr) {
// TODO(pwbug/597): Ensure call object is locked when calling callback. For
// on_error, could potentially move the callback and call it after the
// lock is released.
// TODO(b/234876851): Ensure call object is locked when calling callback.
// For on_error, could potentially move the callback and call it after
// the lock is released.
existing_call->HandleError(Status::Cancelled());
rpc_lock().lock();
}
Expand Down
4 changes: 2 additions & 2 deletions pw_rpc/internal/packet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ enum PacketType {
CLIENT_ERROR = 4;

// Deprecated, do not use. Send a CLIENT_ERROR with status CANCELLED instead.
// TODO(pwbug/512): Remove this packet type.
// TODO(b/234879973): Remove this packet type.
DEPRECATED_CANCEL = 6;

// A client stream has completed.
Expand All @@ -47,7 +47,7 @@ enum PacketType {

// Deprecated, do not use. Formerly was used as the last packet in a server
// stream.
// TODO(pwbug/512): Remove this packet type.
// TODO(b/234879973): Remove this packet type.
DEPRECATED_SERVER_STREAM_END = 3;

// The server was unable to process a request.
Expand Down
2 changes: 1 addition & 1 deletion pw_rpc/packet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Result<Packet> Packet::FromBuffer(ConstByteSpan data) {
return status;
}

// TODO(pwbug/512): CANCEL is equivalent to CLIENT_ERROR with status
// TODO(b/234879973): CANCEL is equivalent to CLIENT_ERROR with status
// CANCELLED. Remove this workaround when CANCEL is removed.
if (packet.type() == PacketType::DEPRECATED_CANCEL) {
packet.set_status(Status::Cancelled());
Expand Down
8 changes: 4 additions & 4 deletions pw_rpc/public/pw_rpc/internal/call.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class Call : public IntrusiveList<Call>::Item {
// is closed.
void SendInitialClientRequest(ConstByteSpan payload)
PW_UNLOCK_FUNCTION(rpc_lock()) {
// TODO(pwbug/597): Ensure the call object is locked before releasing the
// TODO(b/234876851): Ensure the call object is locked before releasing the
// RPC mutex.
if (const Status status = SendPacket(PacketType::REQUEST, payload);
!status.ok()) {
Expand All @@ -150,7 +150,7 @@ class Call : public IntrusiveList<Call>::Item {
void HandlePayload(ConstByteSpan message) const
PW_UNLOCK_FUNCTION(rpc_lock()) {
const bool invoke = on_next_ != nullptr;
// TODO(pwbug/597): Ensure on_next_ is properly guarded.
// TODO(b/234876851): Ensure on_next_ is properly guarded.
rpc_lock().unlock();

if (invoke) {
Expand All @@ -170,7 +170,7 @@ class Call : public IntrusiveList<Call>::Item {
void HandleChannelClose() PW_EXCLUSIVE_LOCKS_REQUIRED(rpc_lock()) {
// Locking here is problematic because CallOnError releases rpc_lock().
//
// pwbug/597 must be addressed before the locking here can be cleaned up.
// b/234876851 must be addressed before the locking here can be cleaned up.
MarkClosed();

CallOnError(Status::Aborted());
Expand Down Expand Up @@ -258,7 +258,7 @@ class Call : public IntrusiveList<Call>::Item {
void CallOnError(Status error) PW_UNLOCK_FUNCTION(rpc_lock()) {
const bool invoke = on_error_ != nullptr;

// TODO(pwbug/597): Ensure on_error_ is properly guarded.
// TODO(b/234876851): Ensure on_error_ is properly guarded.
rpc_lock().unlock();
if (invoke) {
on_error_(error);
Expand Down
6 changes: 3 additions & 3 deletions pw_rpc/public/pw_rpc/internal/client_call.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class UnaryResponseClientCall : public ClientCall {

void set_on_completed(Function<void(ConstByteSpan, Status)>&& on_completed)
PW_LOCKS_EXCLUDED(rpc_lock()) {
// TODO(pwbug/597): Ensure on_completed_ is properly guarded.
// TODO(b/234876851): Ensure on_completed_ is properly guarded.
LockGuard lock(rpc_lock());
set_on_completed_locked(std::move(on_completed));
}
Expand Down Expand Up @@ -160,7 +160,7 @@ class StreamResponseClientCall : public ClientCall {
UnregisterAndMarkClosed();
rpc_lock().unlock();

// TODO(pwbug/597): Ensure on_completed_ is properly guarded.
// TODO(b/234876851): Ensure on_completed_ is properly guarded.
if (invoke_callback) {
on_completed_(status);
}
Expand Down Expand Up @@ -195,7 +195,7 @@ class StreamResponseClientCall : public ClientCall {

void set_on_completed(Function<void(Status)>&& on_completed)
PW_LOCKS_EXCLUDED(rpc_lock()) {
// TODO(pwbug/597): Ensure on_completed_ is properly guarded.
// TODO(b/234876851): Ensure on_completed_ is properly guarded.
LockGuard lock(rpc_lock());
set_on_completed_locked(std::move(on_completed));
}
Expand Down
4 changes: 2 additions & 2 deletions pw_rpc/public/pw_rpc/internal/server_call.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ServerCall : public Call {
public:
void HandleClientStreamEnd() PW_UNLOCK_FUNCTION(rpc_lock()) {
MarkClientStreamCompleted();
// TODO(pwbug/597): Ensure on_client_stream_end_ is properly guarded.
// TODO(b/234876851): Ensure on_client_stream_end_ is properly guarded.
rpc_lock().unlock();

#if PW_RPC_CLIENT_STREAM_END_CALLBACK
Expand Down Expand Up @@ -63,7 +63,7 @@ class ServerCall : public Call {
template <typename UnusedType = void>
void set_on_client_stream_end(
[[maybe_unused]] Function<void()>&& on_client_stream_end) {
// TODO(pwbug/597): Ensure on_client_stream_end_ is properly guarded.
// TODO(b/234876851): Ensure on_client_stream_end_ is properly guarded.
static_assert(
cfg::kClientStreamEndCallbackEnabled<UnusedType>,
"The client stream end callback is disabled, so "
Expand Down
2 changes: 1 addition & 1 deletion pw_sync/binary_semaphore_facade_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ TEST(BinarySemaphore, EmptyInitialState) {
EXPECT_FALSE(semaphore.try_acquire());
}

// TODO(pwbug/291): Add real concurrency tests once we have pw::thread.
// TODO(b/235284163): Add real concurrency tests once we have pw::thread.

TEST(BinarySemaphore, Release) {
BinarySemaphore semaphore;
Expand Down
2 changes: 1 addition & 1 deletion pw_sync/counting_semaphore_facade_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ TEST(CountingSemaphore, EmptyInitialState) {
EXPECT_FALSE(semaphore.try_acquire());
}

// TODO(pwbug/291): Add real concurrency tests once we have pw::thread.
// TODO(b/235284163): Add real concurrency tests once we have pw::thread.

TEST(CountingSemaphore, SingleRelease) {
CountingSemaphore semaphore;
Expand Down
12 changes: 6 additions & 6 deletions pw_sync/interrupt_spin_lock_facade_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ TEST(InterruptSpinLock, LockUnlock) {
interrupt_spin_lock.unlock();
}

// TODO(pwbug/291): Add real concurrency tests once we have pw::thread on SMP
// TODO(b/235284163): Add real concurrency tests once we have pw::thread on SMP
// systems given that uniprocessor systems cannot fail to acquire an ISL.

InterruptSpinLock static_interrupt_spin_lock;
TEST(InterruptSpinLock, LockUnlockStatic) {
static_interrupt_spin_lock.lock();
// TODO(pwbug/291): Ensure other cores fail to lock when its locked.
// TODO(b/235284163): Ensure other cores fail to lock when its locked.
// EXPECT_FALSE(static_interrupt_spin_lock.try_lock());
static_interrupt_spin_lock.unlock();
}
Expand All @@ -53,7 +53,7 @@ TEST(InterruptSpinLock, TryLockUnlock) {
const bool locked = interrupt_spin_lock.try_lock();
EXPECT_TRUE(locked);
if (locked) {
// TODO(pwbug/291): Ensure other cores fail to lock when its locked.
// TODO(b/235284163): Ensure other cores fail to lock when its locked.
// EXPECT_FALSE(interrupt_spin_lock.try_lock());
interrupt_spin_lock.unlock();
}
Expand All @@ -62,15 +62,15 @@ TEST(InterruptSpinLock, TryLockUnlock) {
TEST(VirtualInterruptSpinLock, LockUnlock) {
pw::sync::VirtualInterruptSpinLock interrupt_spin_lock;
interrupt_spin_lock.lock();
// TODO(pwbug/291): Ensure other cores fail to lock when its locked.
// TODO(b/235284163): Ensure other cores fail to lock when its locked.
// EXPECT_FALSE(interrupt_spin_lock.try_lock());
interrupt_spin_lock.unlock();
}

VirtualInterruptSpinLock static_virtual_interrupt_spin_lock;
TEST(VirtualInterruptSpinLock, LockUnlockStatic) {
static_virtual_interrupt_spin_lock.lock();
// TODO(pwbug/291): Ensure other cores fail to lock when its locked.
// TODO(b/235284163): Ensure other cores fail to lock when its locked.
// EXPECT_FALSE(static_virtual_interrupt_spin_lock.try_lock());
static_virtual_interrupt_spin_lock.unlock();
}
Expand All @@ -84,7 +84,7 @@ TEST(InterruptSpinLock, LockUnlockInC) {
TEST(InterruptSpinLock, TryLockUnlockInC) {
pw::sync::InterruptSpinLock interrupt_spin_lock;
ASSERT_TRUE(pw_sync_InterruptSpinLock_CallTryLock(&interrupt_spin_lock));
// TODO(pwbug/291): Ensure other cores fail to lock when its locked.
// TODO(b/235284163): Ensure other cores fail to lock when its locked.
// EXPECT_FALSE(pw_sync_InterruptSpinLock_CallTryLock(&interrupt_spin_lock));
pw_sync_InterruptSpinLock_CallUnlock(&interrupt_spin_lock);
}
Expand Down
14 changes: 7 additions & 7 deletions pw_sync/mutex_facade_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ void pw_sync_Mutex_CallUnlock(pw_sync_Mutex* mutex);

} // extern "C"

// TODO(pwbug/291): Add real concurrency tests once we have pw::thread.
// TODO(b/235284163): Add real concurrency tests once we have pw::thread.

TEST(Mutex, LockUnlock) {
pw::sync::Mutex mutex;
mutex.lock();
// TODO(pwbug/291): Ensure it fails to lock when already held.
// TODO(b/235284163): Ensure it fails to lock when already held.
// EXPECT_FALSE(mutex.try_lock());
mutex.unlock();
}

Mutex static_mutex;
TEST(Mutex, LockUnlockStatic) {
static_mutex.lock();
// TODO(pwbug/291): Ensure it fails to lock when already held.
// TODO(b/235284163): Ensure it fails to lock when already held.
// EXPECT_FALSE(static_mutex.try_lock());
static_mutex.unlock();
}
Expand All @@ -52,7 +52,7 @@ TEST(Mutex, TryLockUnlock) {
const bool locked = mutex.try_lock();
EXPECT_TRUE(locked);
if (locked) {
// TODO(pwbug/291): Ensure it fails to lock when already held.
// TODO(b/235284163): Ensure it fails to lock when already held.
// EXPECT_FALSE(mutex.try_lock());
mutex.unlock();
}
Expand All @@ -61,15 +61,15 @@ TEST(Mutex, TryLockUnlock) {
TEST(VirtualMutex, LockUnlock) {
pw::sync::VirtualMutex mutex;
mutex.lock();
// TODO(pwbug/291): Ensure it fails to lock when already held.
// TODO(b/235284163): Ensure it fails to lock when already held.
// EXPECT_FALSE(mutex.try_lock());
mutex.unlock();
}

VirtualMutex static_virtual_mutex;
TEST(VirtualMutex, LockUnlockStatic) {
static_virtual_mutex.lock();
// TODO(pwbug/291): Ensure it fails to lock when already held.
// TODO(b/235284163): Ensure it fails to lock when already held.
// EXPECT_FALSE(static_virtual_mutex.try_lock());
static_virtual_mutex.unlock();
}
Expand All @@ -83,7 +83,7 @@ TEST(Mutex, LockUnlockInC) {
TEST(Mutex, TryLockUnlockInC) {
pw::sync::Mutex mutex;
ASSERT_TRUE(pw_sync_Mutex_CallTryLock(&mutex));
// TODO(pwbug/291): Ensure it fails to lock when already held.
// TODO(b/235284163): Ensure it fails to lock when already held.
// EXPECT_FALSE(pw_sync_Mutex_CallTryLock(&mutex));
pw_sync_Mutex_CallUnlock(&mutex);
}
Expand Down
Loading

0 comments on commit 0daafcc

Please sign in to comment.