summaryrefslogtreecommitdiff
path: root/test/shell-test.c
Commit message (Collapse)AuthorAgeFilesLines
* shell-test: Don't use _dbus_get_tmpdir()Simon McVittie2017-02-161-1/+1
| | | | | | | | | | | There's no particular reason to be using a temporary directory (it's just some arbitrary string), and it will be harder for future changes to eradicate uses of a temporary directory that is shared between users if we list it here. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99828 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Philip Withnall <withnall@endlessm.com>
* test: Add some OOM paths to the shell-testPhilip Withnall2017-02-131-5/+16
| | | | | | | | | | I am increasingly of the opinion that this is a gigantic waste of time. But at least Coverity will be happy. Coverity IDs: 60585, 60586 Signed-off-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99724 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* shell-test: Calling _dbus_string_init without checking return value (CID 60587).Ralf Habacker2015-11-121-1/+8
| | | | | | | Reported by Coverity: CID 60587: Unchecked return value (CHECKED_RETURN) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* test_command_line_internal: Fix variable original_argv going out of scope ↵Ralf Habacker2015-05-011-3/+3
| | | | | | | | | leaks the storage it points to (CID 60588). Reported by Coverity: CID 60588: Resource leak (RESOURCE_LEAK) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* test_command_line_internal: Fix 'variable shell_argv going out of scope ↵Ralf Habacker2015-05-011-0/+2
| | | | | | | | | leaks the storage it points to' (CID 54751) Reported by Coverity: CID 54751: Resource leak (RESOURCE_LEAK) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* test-shell, test-printf: produce TAP output like the other installable testsSimon McVittie2015-04-161-24/+79
| | | | | Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89846
* CID 54766: Resource leak (RESOURCE_LEAK).Ralf Habacker2015-04-141-1/+5
| | | | | | | Variable original_argv going out of scope leaks the storage it points to. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Define DBUS_COMPILATION externally for all tests that use internal stuffSimon McVittie2013-09-031-1/+1
| | | | | | | It might as well go in the AM_CPPFLAGS rather than in the source code. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
* Consistently include <config.h> in all C source files and never in header files.Marcus Brinkmann2010-03-191-0/+1
|
* Patches by Kjartan Maraas <kmaraas at gnome dot org>John (J5) Palmieri2006-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bus/services.c (bus_service_list_queued_owners): Add a pointer cast to fix compiler warning * dbus/dbus-dataslot.c (_dbus_data_slot_list_get): return a NULL instead of FALSE since the return type is not expecting a boolean * dbus/dbus-marshal-basic.c (_dbus_marshal_test): Remove unused variable * dbus/dbus-marshal-recursive-util.c (node_new): return a NULL instead of FALSE since the return type is not expecting a boolean * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new): Send a NULL into _dbus_transport_new_for_fd instead of a FALSE because we are expecting a pointer not a boolean * dbus/dbus-sysdeps-util.c (_dbus_get_tmpdir): add void as the parameter so some compilers don't complain * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket, _dbus_transport_new_for_tcp_socket): Send a NULL into _dbus_transport_new_for_fd instead of a FALSE because we are expecting a pointer not a boolean * test/shell-test.c (test_command_line): cast the second argument to _dbus_list_append to avoid compiler warnings * test/test-names.c (main): remove unused variable * test/test-service.c (check_hello_from_self_reply): Initialize echo_message and echo_reply to NULL * test/test-shell-service.c (handle_echo): Remove unused variable and cast the third parameter passed to dbus_connection_get_object_path_data to avoid compiler warrnings * test/name-test/test-names.c (clear_message_queue): Remove unused function * test/name-test/test-pending-call-dispatch.c: Fix format string in printf
* * dbus/dbus-sysdeps.c:John (J5) Palmieri2006-08-101-1/+2
| | | | | | | | * dbus/dbus-address.c: * bus/activation.c: * test/shell-test.c: don't hardcode tmp directory (patch from Dave Meikle <dmk at davemeikle dot co dot uk>)
* Checking in Rodrigo's patch along with my fixes to the patchJohn (J5) Palmieri2005-07-141-0/+107
2005-07-14 John (J5) Palmieri <johnp@redhat.com> * bus/activation.c: clean up all tabs to be 8 spaces (bus_activation_activate_service): make sure we clean up if activation fails * bus/dispatch.c: clean up all tabs to be 8 spaces (check_shell_fail_service_auto_start): New function tests to make sure we get fail properly when trying to auto start a service with a faulty command line (check_shell_service_success_auto_start): New function tests to make sure auto started services get the arguments on the command line * test/test-shell-service.c: Added service for testing auto-starting with command line arguments * test/data/valid-service-files/debug-shell-echo-fail.service.in, test/data/valid-service-files/debug-shell-echo-success.service.in: Added service files for testing auto-starting with command line arguments * */.cvsignore: added a bunch of generated files to various .cvsignore files 2005-07-14 Rodrigo Moya <rodrigo@novell.com> * dbus/dbus-shell.[ch]: copy/pasted code from GLib. * dbus/Makefile.am: added new files to build. * bus/activation.c (bus_activation_activate_service): support activation commands with parameters. * test/shell-test.c: added test program for the shell parsing code.