Skip to content

Commit

Permalink
fix(kmod): rename agnocast.c (#471)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>
  • Loading branch information
veqcc authored Mar 5, 2025
1 parent 002812d commit 56ae9e8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .cppcheck_suppressions
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*:*/test/*

uninitvar:*/agnocast_kmod/agnocast.c
uninitvar:*/agnocast_kmod/*

checkersReport
missingInclude
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cppcheck-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Add kmod to paths
id: add-kmod
run: |
echo "filtered-full-paths=${{ steps.add-header-paths.outputs.target-paths }} $(realpath agnocast_kmod/agnocast.c)" >> $GITHUB_OUTPUT
echo "filtered-full-paths=${{ steps.add-header-paths.outputs.target-paths }} $(realpath agnocast_kmod/agnocast_main.c)" >> $GITHUB_OUTPUT
- name: Run Cppcheck on modified packages
if: ${{ steps.add-kmod.outputs.filtered-full-paths != '' }}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ To use dynamic_debug for dynamically outputting debug logs, please run the follo

```bash
sudo su
echo 'file agnocast.c +p' > /sys/kernel/debug/dynamic_debug/control
echo 'file agnocast_main.c +p' > /sys/kernel/debug/dynamic_debug/control
```

Check if dynamic_debug is enabled by running the following command. If the right side of the `=` is `p`, it is enabled. (If it's `_`, it is disabled.)

```bash
sudo cat /sys/kernel/debug/dynamic_debug/control | grep "agnocast.c"
/.../agnocast/agnocast_kmod/agnocast.c:810 [agnocast]release_msgs_to_meet_depth =p "Release oldest message in the publisher_queue (publisher_pid=%d) of the topic (topic_name=%s) with qos_depth %d. (release_msgs_to_meet_depth)\012"
/.../agnocast/agnocast_kmod/agnocast.c:367 [agnocast]insert_message_entry =p "Insert an entry (topic_name=%s publisher_pid=%d msg_virtual_address=%lld timestamp=%lld). (insert_message_entry)"
sudo cat /sys/kernel/debug/dynamic_debug/control | grep "agnocast_main.c"
/.../agnocast/agnocast_kmod/agnocast_main.c:810 [agnocast]release_msgs_to_meet_depth =p "Release oldest message in the publisher_queue (publisher_pid=%d) of the topic (topic_name=%s) with qos_depth %d. (release_msgs_to_meet_depth)\012"
/.../agnocast/agnocast_kmod/agnocast_main.c:367 [agnocast]insert_message_entry =p "Insert an entry (topic_name=%s publisher_pid=%d msg_virtual_address=%lld timestamp=%lld). (insert_message_entry)"
```

To use dynamic_debug, the Linux kernel configuration must have CONFIG_DYNAMIC_DEBUG set to `y`.
Expand Down
3 changes: 2 additions & 1 deletion agnocast_kmod/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ ccflags-y += -Wall -Werror

ifneq ($(KUNIT_BUILD),y)
obj-m := agnocast.o
agnocast-objs := agnocast_main.o
else
ifeq ($(CONFIG_KUNIT)$(CONFIG_GCOV_KERNEL),yy)
obj-m := agnocast_kunit.o
agnocast_kunit-m := agnocast_kunit_main.o agnocast.o \
agnocast_kunit-objs := agnocast_kunit_main.o agnocast_main.o \
agnocast_kunit/agnocast_kunit_subscriber_add.o \
agnocast_kunit/agnocast_kunit_publisher_add.o \
agnocast_kunit/agnocast_kunit_increment_rc.o \
Expand Down
2 changes: 1 addition & 1 deletion agnocast_kmod/agnocast.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ union ioctl_topic_info_args {
#define AGNOCAST_GET_NODE_PUBLISHER_TOPICS_CMD _IOR('R', 5, union ioctl_node_info_args)

// ================================================
// public functions in agnocast.c
// public functions in agnocast_main.c

void agnocast_init_mutexes(void);
int agnocast_init_sysfs(void);
Expand Down
File renamed without changes.

0 comments on commit 56ae9e8

Please sign in to comment.