-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add test binary for measuring device throughput on Ubuntu. #25
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
gettimeofday(&fscan1, NULL); | ||
printf("sscanf, sprintf took %7.3f [msec]\n", DELTA_SEC(fscan0, fscan1) * 1000); | ||
|
||
fprintf(stderr, str); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build is failing on ROS buildfarm (e.g.):
15:08:55 [ 80%] Building C object CMakeFiles/dynpick_com_tester.dir/src/test-com.c.o
15:08:55 /usr/lib/ccache/x86_64-linux-gnu-gcc -DROSCONSOLE_BACKEND_LOG4CXX -DROS_PACKAGE_NAME=\"dynpick_driver\" -I/opt/ros/kinetic/include -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -o CMakeFiles/dynpick_com_tester.dir/src/test-com.c.o -c /tmp/binarydeb/ros-kinetic-dynpick-driver-0.0.10/src/test-com.c
15:08:55 /tmp/binarydeb/ros-kinetic-dynpick-driver-0.0.10/src/test-com.c: In function ‘main’:
15:08:55 /tmp/binarydeb/ros-kinetic-dynpick-driver-0.0.10/src/test-com.c:126:2: warning: implicit declaration of function ‘SetComAttr’ [-Wimplicit-function-declaration]
15:08:55 SetComAttr(fd);
15:08:55 ^
15:08:55 /tmp/binarydeb/ros-kinetic-dynpick-driver-0.0.10/src/test-com.c:201:18: error: format not a string literal and no format arguments [-Werror=format-security]
15:08:55 fprintf(stderr, str);
15:08:55 ^
15:08:55 /tmp/binarydeb/ros-kinetic-dynpick-driver-0.0.10/src/test-com.c:210:11: error: format not a string literal and no format arguments [-Werror=format-security]
15:08:55 printf(str);
15:08:55 ^
15:08:55 /tmp/binarydeb/ros-kinetic-dynpick-driver-0.0.10/src/test-com.c:226:2: warning: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration]
15:08:55 exit(0); //scanf("%s", str);
15:08:55 ^
15:08:55 /tmp/binarydeb/ros-kinetic-dynpick-driver-0.0.10/src/test-com.c:226:2: warning: incompatible implicit declaration of built-in function ‘exit’
15:08:55 /tmp/binarydeb/ros-kinetic-dynpick-driver-0.0.10/src/test-com.c:226:2: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
15:08:55 /tmp/binarydeb/ros-kinetic-dynpick-driver-0.0.10/src/test-com.c:93:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
15:08:55 scanf("%d", &comNo);
15:08:55 ^
15:08:55 cc1: some warnings being treated as errors
15:08:55 make[4]: *** [CMakeFiles/dynpick_com_tester.dir/src/test-com.c.o] Error 1
15:08:55 CMakeFiles/dynpick_com_tester.dir/build.make:65: recipe for target 'CMakeFiles/dynpick_com_tester.dir/src/test-com.c.o' failed
15:08:55 make[3]: *** [CMakeFiles/dynpick_com_tester.dir/all] Error 2
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.
AddingModifyingtest-com_throughput.c
that is based ontest-com.c
to measure the throughput of 1) device access and 2) communication between driver and a client program to the driver.Also add an installation rule for it.