From 7132b8384f798e2d9d00fee07bba3a56b4ace039 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Sun, 29 Oct 2023 12:32:11 -0400 Subject: [PATCH] tests: normalize names of files and more The current naming situation is somewhat of a mess in the `tests` directory, making it difficult to deduce (or write) a convention. Use hyphens to separate words as much as possible, following what we usually like for source file names (see `tree src`). Pretty much the only things remaining with underscores are Python file names because of the `import` constraints and because it's Python's own convention. Also make all shell scripts have the `.sh` extension. This makes any worthy editor highlight the shell syntax correctly and tells you immediately it's not a compiled ("binary") executable. I'd prefer `.bash` for Bash code, but I don't think we need to go as far. Signed-off-by: Philippe Proulx Change-Id: I43cd279d78c240a7e3686ad8afd6759bad9f575f Reviewed-on: https://review.lttng.org/c/babeltrace/+/11170 Tested-by: jenkins Reviewed-by: Simon Marchi CI-Build: Simon Marchi --- .gitignore | 26 +-- CONTRIBUTING.adoc | 25 +-- tests/Makefile.am | 154 +++++++++--------- .../{test_python_bt2 => test-python-bt2.sh} | 0 tests/bitfield/Makefile.am | 4 +- .../{test_bitfield.c => test-bitfield.c} | 0 ...=> test-auto-source-discovery-grouping.sh} | 0 ...> test-auto-source-discovery-log-level.sh} | 0 ...s => test-auto-source-discovery-params.sh} | 0 ...test_convert_args => test-convert-args.sh} | 4 +- ...test_list_plugins => test-list-plugins.sh} | 8 +- .../params/{test_params => test-params.sh} | 0 tests/cli/query/{test_query => test-query.sh} | 6 +- .../{test_exit_status => test-exit-status.sh} | 16 +- tests/cli/{test_help => test-help.sh} | 4 +- ...test_intersection => test-intersection.sh} | 4 +- ...f_metadata => test-output-ctf-metadata.sh} | 2 +- ...> test-output-path-ctf-non-lttng-trace.sh} | 4 +- ..._packet_seq_num => test-packet-seq-num.sh} | 10 +- .../{test_trace_copy => test-trace-copy.sh} | 0 .../{test_trace_read => test-trace-read.sh} | 0 tests/cli/{test_trimmer => test-trimmer.sh} | 0 tests/ctf-writer/Makefile.am | 6 +- .../ctf-writer/{ctf_writer.c => ctf-writer.c} | 0 .../{test_ctf_writer => test-ctf-writer.sh} | 2 +- .../bt_plugin_test_cli_exit_status.py | 2 +- ...adata.ref => test-output-ctf-metadata.ref} | 0 .../channel0_0 | Bin .../index/channel0_0.idx | Bin .../metadata | 0 ...{stored_values.mctf => stored-values.mctf} | 0 .../2-lost-before-last}/metadata | 0 .../2-lost-before-last}/test_stream_0 | Bin .../2-streams-lost-in-1}/metadata | 0 .../2-streams-lost-in-1}/test_stream_0 | Bin .../2-streams-lost-in-1}/test_stream_1 | Bin .../2-streams-lost-in-2}/metadata | 0 .../2-streams-lost-in-2}/test_stream_0 | Bin .../2-streams-lost-in-2}/test_stream_1 | Bin .../index/stream_0.idx | Bin .../7-lost-between-2-with-index}/metadata | 0 .../7-lost-between-2-with-index}/stream_0 | Bin .../no-lost-not-starting-at-0}/metadata | 0 .../no-lost-not-starting-at-0}/test_stream_0 | Bin .../no-lost}/metadata | 0 .../no-lost}/test_stream_0 | Bin .../ctf-traces/succeed/debug-info/channel0_0 | Bin 4096 -> 4096 bytes .../flt.lttng-utils.debug-info/Makefile | 20 +-- .../flt.lttng-utils.debug-info/README.md | 52 +++--- .../bt_plugin_test_debug_info.py | 2 +- ...8cdd87f7fe64c13b6daad553987eafd40cbb.debug | Bin .../libhello_so => build-id/libhello-so} | Bin .../libhello_so => debug-link/libhello-so} | Bin 22960 -> 22960 bytes .../libhello-so.debug} | Bin .../libhello_so => dwarf-full/libhello-so} | Bin .../libhello_so => elf-only/libhello-so} | Bin ...8cdd87f7fe64c13b6daad553987eafd40cbb.debug | Bin .../libhello_so => build-id/libhello-so} | Bin .../libhello_so => debug-link/libhello-so} | Bin 72472 -> 72472 bytes .../libhello-so.debug} | Bin .../libhello_so => dwarf-full/libhello-so} | Bin .../libhello_so => elf-only/libhello-so} | Bin ...8cdd87f7fe64c13b6daad553987eafd40cbb.debug | Bin .../libhello_so => build-id/libhello-so} | Bin .../libhello_so => debug-link/libhello-so} | Bin 74000 -> 74000 bytes .../libhello-so.debug} | Bin .../libhello_so => dwarf-full/libhello-so} | Bin .../libhello_so => elf-only/libhello-so} | Bin .../trace-debug-info.expect | 6 +- ...8cdd87f7fe64c13b6daad553987eafd40cbb.debug | Bin .../build-id/libhello-so} | Bin .../debug-link/libhello-so} | Bin 24672 -> 24672 bytes .../debug-link/libhello-so.debug} | Bin .../dwarf-full/libhello-so} | Bin .../elf-only/libhello-so} | Bin .../flt.utils.muxer/bt_plugin_muxer_test.py | 24 +-- ...expect => basic-timestamp-ordering.expect} | 0 ...s_id.expect => diff-event-class-id.expect} | 0 ...me.expect => diff-event-class-name.expect} | 0 ...s.expect => diff-inactivity-msg-cs.expect} | 0 ..._id.expect => diff-stream-class-id.expect} | 0 ...e.expect => diff-stream-class-name.expect} | 0 ...xpect => diff-stream-class-no-name.expect} | 0 ...stream_id.expect => diff-stream-id.expect} | 0 ...am_name.expect => diff-stream-name.expect} | 0 ...name.expect => diff-stream-no-name.expect} | 0 ...ace_name.expect => diff-trace-name.expect} | 0 ...ring.expect => multi-iter-ordering.expect} | 0 ...ect => inactivity-discarded-packet.expect} | 0 ....json => inactivity-discarded-packet.json} | 4 +- ...{list_sessions.json => list-sessions.json} | 0 ...nverse.json => multi-domains-inverse.json} | 0 ...{multi_domains.json => multi-domains.json} | 0 .../{rate_limited.json => rate-limited.json} | 0 ..._metadata.expect => split-metadata.expect} | 0 ...plit_metadata.json => split-metadata.json} | 4 +- ...red_values.expect => stored-values.expect} | 0 ...{stored_values.json => stored-values.json} | 4 +- tests/lib/Makefile.am | 30 ++-- tests/lib/conds/Makefile.am | 2 +- tests/lib/conds/{test_conds => test-conds.sh} | 0 tests/lib/{test_bt_uuid.c => test-bt-uuid.c} | 0 .../{test_bt_values.c => test-bt-values.c} | 0 ...est_fields_bin.cpp => test-fields-bin.cpp} | 0 tests/lib/{test_fields => test-fields.sh} | 2 +- .../{test_graph_topo.c => test-graph-topo.c} | 0 tests/lib/{test_plugin => test-plugin.sh} | 0 ...uction-listener-in-destruction-listener.c} | 0 ...{test_simple_sink.c => test-simple-sink.c} | 0 ...est_trace_ir_ref.c => test-trace-ir-ref.c} | 0 tests/param-validation/Makefile.am | 4 +- ...m_validation.c => test-param-validation.c} | 0 .../flt.lttng-utils.debug-info/Makefile.am | 24 +-- ...ux-gnu => test-bin-info-i386-linux-gnu.sh} | 2 +- ...gnu => test-bin-info-powerpc-linux-gnu.sh} | 2 +- ...=> test-bin-info-powerpc64le-linux-gnu.sh} | 2 +- ...-gnu => test-bin-info-x86-64-linux-gnu.sh} | 4 +- .../{test_bin_info.c => test-bin-info.c} | 12 +- ...linux-gnu => test-dwarf-i386-linux-gnu.sh} | 2 +- ...ux-gnu => test-dwarf-powerpc-linux-gnu.sh} | 2 +- ...nu => test-dwarf-powerpc64le-linux-gnu.sh} | 2 +- ...nux-gnu => test-dwarf-x86-64-linux-gnu.sh} | 4 +- .../{test_dwarf.c => test-dwarf.c} | 6 +- .../{test_succeed => test-succeed.sh} | 12 +- .../flt.utils.muxer/succeed/Makefile.am | 2 +- .../succeed/{test_succeed => test-succeed.sh} | 24 +-- tests/plugins/flt.utils.trimmer/Makefile.am | 2 +- .../{test_trimming => test-trimming.sh} | 0 tests/plugins/sink.ctf.fs/Makefile.am | 4 +- tests/plugins/sink.ctf.fs/succeed/Makefile.am | 2 +- .../succeed/{test_succeed => test-succeed.sh} | 0 ...ngle_trace => test-assume-single-trace.sh} | 0 ...test_stream_names => test-stream-names.sh} | 0 .../succeed/{test_succeed => test-succeed.sh} | 0 tests/plugins/sink.text.pretty/Makefile.am | 4 +- .../{test_enum => test-enum.sh} | 6 +- ...st_pretty_python => test-pretty-python.sh} | 0 tests/plugins/src.ctf.fs/Makefile.am | 10 +- .../fail/{test_fail => test-fail.sh} | 4 +- ...adata_info => test-query-metadata-info.sh} | 8 +- ...upport_info => test-query-support-info.sh} | 0 ...ry_trace_info => test-query-trace-info.sh} | 0 tests/plugins/src.ctf.fs/succeed/Makefile.am | 2 +- .../succeed/{test_succeed => test-succeed.sh} | 10 +- ...rdering => test-deterministic-ordering.sh} | 4 +- .../{test_live => test-live.sh} | 54 +++--- ...rovider => test-python-plugin-provider.sh} | 0 tests/utils/Makefile.am | 2 +- .../{run_python_bt2 => run-python-bt2.sh} | 0 tests/utils/utils.sh | 4 +- 150 files changed, 324 insertions(+), 323 deletions(-) rename tests/bindings/python/bt2/{test_python_bt2 => test-python-bt2.sh} (100%) rename tests/bitfield/{test_bitfield.c => test-bitfield.c} (100%) rename tests/cli/convert/{test_auto_source_discovery_grouping => test-auto-source-discovery-grouping.sh} (100%) rename tests/cli/convert/{test_auto_source_discovery_log_level => test-auto-source-discovery-log-level.sh} (100%) rename tests/cli/convert/{test_auto_source_discovery_params => test-auto-source-discovery-params.sh} (100%) rename tests/cli/convert/{test_convert_args => test-convert-args.sh} (99%) rename tests/cli/list-plugins/{test_list_plugins => test-list-plugins.sh} (85%) rename tests/cli/params/{test_params => test-params.sh} (100%) rename tests/cli/query/{test_query => test-query.sh} (92%) rename tests/cli/{test_exit_status => test-exit-status.sh} (79%) rename tests/cli/{test_help => test-help.sh} (97%) rename tests/cli/{test_intersection => test-intersection.sh} (95%) rename tests/cli/{test_output_ctf_metadata => test-output-ctf-metadata.sh} (93%) rename tests/cli/{test_output_path_ctf_non_lttng_trace => test-output-path-ctf-non-lttng-trace.sh} (89%) rename tests/cli/{test_packet_seq_num => test-packet-seq-num.sh} (81%) rename tests/cli/{test_trace_copy => test-trace-copy.sh} (100%) rename tests/cli/{test_trace_read => test-trace-read.sh} (100%) rename tests/cli/{test_trimmer => test-trimmer.sh} (100%) rename tests/ctf-writer/{ctf_writer.c => ctf-writer.c} (100%) rename tests/ctf-writer/{test_ctf_writer => test-ctf-writer.sh} (83%) rename tests/data/cli/{exit_status => exit-status}/bt_plugin_test_cli_exit_status.py (96%) rename tests/data/cli/{test_output_ctf_metadata.ref => test-output-ctf-metadata.ref} (100%) rename tests/data/ctf-traces/live/{split_metadata => split-metadata}/channel0_0 (100%) rename tests/data/ctf-traces/live/{split_metadata => split-metadata}/index/channel0_0.idx (100%) rename tests/data/ctf-traces/live/{split_metadata => split-metadata}/metadata (100%) rename tests/data/ctf-traces/live/{stored_values.mctf => stored-values.mctf} (100%) rename tests/data/ctf-traces/{packet_seq_num/2_lost_before_last => packet-seq-num/2-lost-before-last}/metadata (100%) rename tests/data/ctf-traces/{packet_seq_num/2_lost_before_last => packet-seq-num/2-lost-before-last}/test_stream_0 (100%) rename tests/data/ctf-traces/{packet_seq_num/2_streams_lost_in_1 => packet-seq-num/2-streams-lost-in-1}/metadata (100%) rename tests/data/ctf-traces/{packet_seq_num/2_streams_lost_in_1 => packet-seq-num/2-streams-lost-in-1}/test_stream_0 (100%) rename tests/data/ctf-traces/{packet_seq_num/2_streams_lost_in_1 => packet-seq-num/2-streams-lost-in-1}/test_stream_1 (100%) rename tests/data/ctf-traces/{packet_seq_num/2_streams_lost_in_2 => packet-seq-num/2-streams-lost-in-2}/metadata (100%) rename tests/data/ctf-traces/{packet_seq_num/2_streams_lost_in_2 => packet-seq-num/2-streams-lost-in-2}/test_stream_0 (100%) rename tests/data/ctf-traces/{packet_seq_num/2_streams_lost_in_2 => packet-seq-num/2-streams-lost-in-2}/test_stream_1 (100%) rename tests/data/ctf-traces/{packet_seq_num/7_lost_between_2_with_index => packet-seq-num/7-lost-between-2-with-index}/index/stream_0.idx (100%) rename tests/data/ctf-traces/{packet_seq_num/7_lost_between_2_with_index => packet-seq-num/7-lost-between-2-with-index}/metadata (100%) rename tests/data/ctf-traces/{packet_seq_num/7_lost_between_2_with_index => packet-seq-num/7-lost-between-2-with-index}/stream_0 (100%) rename tests/data/ctf-traces/{packet_seq_num/no_lost_not_starting_at_0 => packet-seq-num/no-lost-not-starting-at-0}/metadata (100%) rename tests/data/ctf-traces/{packet_seq_num/no_lost_not_starting_at_0 => packet-seq-num/no-lost-not-starting-at-0}/test_stream_0 (100%) rename tests/data/ctf-traces/{packet_seq_num/no_lost => packet-seq-num/no-lost}/metadata (100%) rename tests/data/ctf-traces/{packet_seq_num/no_lost => packet-seq-num/no-lost}/test_stream_0 (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/i386-linux-gnu/{build_id => build-id}/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/i386-linux-gnu/{build_id/libhello_so => build-id/libhello-so} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/i386-linux-gnu/{debug_link/libhello_so => debug-link/libhello-so} (99%) rename tests/data/plugins/flt.lttng-utils.debug-info/i386-linux-gnu/{debug_link/libhello_so.debug => debug-link/libhello-so.debug} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/i386-linux-gnu/{dwarf_full/libhello_so => dwarf-full/libhello-so} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/i386-linux-gnu/{elf_only/libhello_so => elf-only/libhello-so} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/powerpc-linux-gnu/{build_id => build-id}/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/powerpc-linux-gnu/{build_id/libhello_so => build-id/libhello-so} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/powerpc-linux-gnu/{debug_link/libhello_so => debug-link/libhello-so} (99%) rename tests/data/plugins/flt.lttng-utils.debug-info/powerpc-linux-gnu/{debug_link/libhello_so.debug => debug-link/libhello-so.debug} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/powerpc-linux-gnu/{dwarf_full/libhello_so => dwarf-full/libhello-so} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/powerpc-linux-gnu/{elf_only/libhello_so => elf-only/libhello-so} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/powerpc64le-linux-gnu/{build_id => build-id}/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/powerpc64le-linux-gnu/{build_id/libhello_so => build-id/libhello-so} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/powerpc64le-linux-gnu/{debug_link/libhello_so => debug-link/libhello-so} (99%) rename tests/data/plugins/flt.lttng-utils.debug-info/powerpc64le-linux-gnu/{debug_link/libhello_so.debug => debug-link/libhello-so.debug} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/powerpc64le-linux-gnu/{dwarf_full/libhello_so => dwarf-full/libhello-so} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/powerpc64le-linux-gnu/{elf_only/libhello_so => elf-only/libhello-so} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/{x86_64-linux-gnu/build_id => x86-64-linux-gnu/build-id}/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/{x86_64-linux-gnu/build_id/libhello_so => x86-64-linux-gnu/build-id/libhello-so} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/{x86_64-linux-gnu/debug_link/libhello_so => x86-64-linux-gnu/debug-link/libhello-so} (99%) rename tests/data/plugins/flt.lttng-utils.debug-info/{x86_64-linux-gnu/debug_link/libhello_so.debug => x86-64-linux-gnu/debug-link/libhello-so.debug} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/{x86_64-linux-gnu/dwarf_full/libhello_so => x86-64-linux-gnu/dwarf-full/libhello-so} (100%) rename tests/data/plugins/flt.lttng-utils.debug-info/{x86_64-linux-gnu/elf_only/libhello_so => x86-64-linux-gnu/elf-only/libhello-so} (100%) rename tests/data/plugins/flt.utils.muxer/succeed/{basic_timestamp_ordering.expect => basic-timestamp-ordering.expect} (100%) rename tests/data/plugins/flt.utils.muxer/succeed/{diff_event_class_id.expect => diff-event-class-id.expect} (100%) rename tests/data/plugins/flt.utils.muxer/succeed/{diff_event_class_name.expect => diff-event-class-name.expect} (100%) rename tests/data/plugins/flt.utils.muxer/succeed/{diff_inactivity_msg_cs.expect => diff-inactivity-msg-cs.expect} (100%) rename tests/data/plugins/flt.utils.muxer/succeed/{diff_stream_class_id.expect => diff-stream-class-id.expect} (100%) rename tests/data/plugins/flt.utils.muxer/succeed/{diff_stream_class_name.expect => diff-stream-class-name.expect} (100%) rename tests/data/plugins/flt.utils.muxer/succeed/{diff_stream_class_no_name.expect => diff-stream-class-no-name.expect} (100%) rename tests/data/plugins/flt.utils.muxer/succeed/{diff_stream_id.expect => diff-stream-id.expect} (100%) rename tests/data/plugins/flt.utils.muxer/succeed/{diff_stream_name.expect => diff-stream-name.expect} (100%) rename tests/data/plugins/flt.utils.muxer/succeed/{diff_stream_no_name.expect => diff-stream-no-name.expect} (100%) rename tests/data/plugins/flt.utils.muxer/succeed/{diff_trace_name.expect => diff-trace-name.expect} (100%) rename tests/data/plugins/flt.utils.muxer/succeed/{multi_iter_ordering.expect => multi-iter-ordering.expect} (100%) rename tests/data/plugins/src.ctf.lttng-live/{inactivity_discarded_packet.expect => inactivity-discarded-packet.expect} (100%) rename tests/data/plugins/src.ctf.lttng-live/{inactivity_discarded_packet.json => inactivity-discarded-packet.json} (71%) rename tests/data/plugins/src.ctf.lttng-live/{list_sessions.json => list-sessions.json} (100%) rename tests/data/plugins/src.ctf.lttng-live/{multi_domains_inverse.json => multi-domains-inverse.json} (100%) rename tests/data/plugins/src.ctf.lttng-live/{multi_domains.json => multi-domains.json} (100%) rename tests/data/plugins/src.ctf.lttng-live/{rate_limited.json => rate-limited.json} (100%) rename tests/data/plugins/src.ctf.lttng-live/{split_metadata.expect => split-metadata.expect} (100%) rename tests/data/plugins/src.ctf.lttng-live/{split_metadata.json => split-metadata.json} (87%) rename tests/data/plugins/src.ctf.lttng-live/{stored_values.expect => stored-values.expect} (100%) rename tests/data/plugins/src.ctf.lttng-live/{stored_values.json => stored-values.json} (87%) rename tests/lib/conds/{test_conds => test-conds.sh} (100%) rename tests/lib/{test_bt_uuid.c => test-bt-uuid.c} (100%) rename tests/lib/{test_bt_values.c => test-bt-values.c} (100%) rename tests/lib/{test_fields_bin.cpp => test-fields-bin.cpp} (100%) rename tests/lib/{test_fields => test-fields.sh} (83%) rename tests/lib/{test_graph_topo.c => test-graph-topo.c} (100%) rename tests/lib/{test_plugin => test-plugin.sh} (100%) rename tests/lib/{test_remove_destruction_listener_in_destruction_listener.c => test-remove-destruction-listener-in-destruction-listener.c} (100%) rename tests/lib/{test_simple_sink.c => test-simple-sink.c} (100%) rename tests/lib/{test_trace_ir_ref.c => test-trace-ir-ref.c} (100%) rename tests/param-validation/{test_param_validation.c => test-param-validation.c} (100%) rename tests/plugins/flt.lttng-utils.debug-info/{test_bin_info_i386-linux-gnu => test-bin-info-i386-linux-gnu.sh} (95%) rename tests/plugins/flt.lttng-utils.debug-info/{test_bin_info_powerpc-linux-gnu => test-bin-info-powerpc-linux-gnu.sh} (95%) rename tests/plugins/flt.lttng-utils.debug-info/{test_bin_info_powerpc64le-linux-gnu => test-bin-info-powerpc64le-linux-gnu.sh} (95%) rename tests/plugins/flt.lttng-utils.debug-info/{test_bin_info_x86_64-linux-gnu => test-bin-info-x86-64-linux-gnu.sh} (88%) rename tests/plugins/flt.lttng-utils.debug-info/{test_bin_info.c => test-bin-info.c} (98%) rename tests/plugins/flt.lttng-utils.debug-info/{test_dwarf_i386-linux-gnu => test-dwarf-i386-linux-gnu.sh} (94%) rename tests/plugins/flt.lttng-utils.debug-info/{test_dwarf_powerpc-linux-gnu => test-dwarf-powerpc-linux-gnu.sh} (94%) rename tests/plugins/flt.lttng-utils.debug-info/{test_dwarf_powerpc64le-linux-gnu => test-dwarf-powerpc64le-linux-gnu.sh} (94%) rename tests/plugins/flt.lttng-utils.debug-info/{test_dwarf_x86_64-linux-gnu => test-dwarf-x86-64-linux-gnu.sh} (84%) rename tests/plugins/flt.lttng-utils.debug-info/{test_dwarf.c => test-dwarf.c} (97%) rename tests/plugins/flt.lttng-utils.debug-info/{test_succeed => test-succeed.sh} (89%) rename tests/plugins/flt.utils.muxer/succeed/{test_succeed => test-succeed.sh} (78%) rename tests/plugins/flt.utils.trimmer/{test_trimming => test-trimming.sh} (100%) rename tests/plugins/sink.ctf.fs/succeed/{test_succeed => test-succeed.sh} (100%) rename tests/plugins/sink.ctf.fs/{test_assume_single_trace => test-assume-single-trace.sh} (100%) rename tests/plugins/sink.ctf.fs/{test_stream_names => test-stream-names.sh} (100%) rename tests/plugins/sink.text.details/succeed/{test_succeed => test-succeed.sh} (100%) rename tests/plugins/sink.text.pretty/{test_enum => test-enum.sh} (97%) rename tests/plugins/sink.text.pretty/{test_pretty_python => test-pretty-python.sh} (100%) rename tests/plugins/src.ctf.fs/fail/{test_fail => test-fail.sh} (95%) rename tests/plugins/src.ctf.fs/query/{test_query_metadata_info => test-query-metadata-info.sh} (91%) rename tests/plugins/src.ctf.fs/query/{test_query_support_info => test-query-support-info.sh} (100%) rename tests/plugins/src.ctf.fs/query/{test_query_trace_info => test-query-trace-info.sh} (100%) rename tests/plugins/src.ctf.fs/succeed/{test_succeed => test-succeed.sh} (92%) rename tests/plugins/src.ctf.fs/{test_deterministic_ordering => test-deterministic-ordering.sh} (96%) rename tests/plugins/src.ctf.lttng-live/{test_live => test-live.sh} (88%) rename tests/python-plugin-provider/{test_python_plugin_provider => test-python-plugin-provider.sh} (100%) rename tests/utils/{run_python_bt2 => run-python-bt2.sh} (100%) diff --git a/.gitignore b/.gitignore index 70a284b2..c63fcaf0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,18 @@ -/tests/bitfield/test_bitfield -/tests/argpar/test_argpar -/tests/ctf-writer/ctf_writer +/tests/bitfield/test-bitfield +/tests/argpar/test-argpar +/tests/ctf-writer/ctf-writer /tests/lib/plugin -/tests/lib/test_bt_uuid -/tests/lib/test_bt_values -/tests/lib/test_fields_bin -/tests/lib/test_graph_topo -/tests/lib/test_trace_ir_ref -/tests/lib/test_simple_sink -/tests/lib/test_remove_destruction_listener_in_destruction_listener +/tests/lib/test-bt-uuid +/tests/lib/test-bt-values +/tests/lib/test-fields-bin +/tests/lib/test-graph-topo +/tests/lib/test-trace-ir-ref +/tests/lib/test-simple-sink +/tests/lib/test-remove-destruction-listener-in-destruction-listener /tests/lib/conds/conds-triggers -/tests/param-validation/test_param_validation -/tests/plugins/flt.lttng-utils.debug-info/test_bin_info -/tests/plugins/flt.lttng-utils.debug-info/test_dwarf +/tests/param-validation/test-param-validation +/tests/plugins/flt.lttng-utils.debug-info/test-bin-info +/tests/plugins/flt.lttng-utils.debug-info/test-dwarf /tests/plugins/src.ctf.fs/succeed/gen-trace-simple /tests/plugins/sink.ctf.fs/succeed/gen-trace-float /tests/plugins/sink.ctf.fs/succeed/gen-trace-double diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 5435ff6e..23808c04 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -1491,7 +1491,7 @@ tests to run in, so nothing more is needed. If building in-tree, you can run single tests from the tree directly: ---- -$ ./tests/plugins/sink.text.pretty/test_enum +$ ./tests/plugins/sink.text.pretty/test-enum.sh ---- If building out-of-tree, you can get the appropriate environment by sourcing @@ -1500,15 +1500,16 @@ want to run tests. ---- $ source /path/to/my/build/tests/utils/env.sh -$ ./tests/plugins/sink.text.pretty/test_enum +$ ./tests/plugins/sink.text.pretty/test-enum.sh ---- ==== Python -You can use the `tests/utils/run_python_bt2` script to run any command -within an environment making the build's `bt2` Python package available. +You can use the `tests/utils/run-python-bt2.sh` script to run any +command within an environment making the build's `bt2` Python package +available. -`run_python_bt2` uses <> which needs to know the +`run-python-bt2.sh` uses <> which needs to know the build directory, so make sure you set the `BT_TESTS_BUILDDIR` environment variable correctly _if you build out of tree_, for example: @@ -1517,10 +1518,10 @@ $ export BT_TESTS_BUILDDIR=/path/to/build/babeltrace/tests ---- You can run any command which needs the `bt2` Python package through -`run_python_bt2`, for example: +`run-python-bt2.sh`, for example: ---- -$ ./tests/utils/run_python_bt2 ipython3 +$ ./tests/utils/run-python-bt2.sh ipython3 ---- === Report format @@ -1566,13 +1567,13 @@ To run all the `bt2` Python package tests: * Run: + ---- -$ ./tests/utils/run_python_bt2 ./tests/bindings/python/bt2/test_python_bt2 +$ ./tests/utils/run-python-bt2.sh ./tests/bindings/python/bt2/test-python-bt2.sh ---- + or: + ---- -$ ./tests/utils/run_python_bt2 python3 ./tests/utils/python/testrunner.py \ +$ ./tests/utils/run-python-bt2.sh python3 ./tests/utils/python/testrunner.py \ ./tests/bindings/python/bt2/ -p '*.py' ---- @@ -1582,7 +1583,7 @@ To run **all the tests** in a test module (for example, * Run: + ---- -$ ./tests/utils/run_python_bt2 python3 ./tests/utils/python/testrunner.py \ +$ ./tests/utils/run-python-bt2.sh python3 ./tests/utils/python/testrunner.py \ ./tests/bindings/python/bt2 -t test_value ---- @@ -1592,7 +1593,7 @@ To run a **specific test case** (for example, `RealValueTestCase` within * Run: + ---- -$ ./tests/utils/run_python_bt2 python3 ./tests/utils/python/testrunner.py \ +$ ./tests/utils/run-python-bt2.sh python3 ./tests/utils/python/testrunner.py \ ./tests/bindings/python/bt2/ -t test_value.RealValueTestCase ---- @@ -1602,7 +1603,7 @@ To run a **specific test** (for example, * Run: + ---- -$ ./tests/utils/run_python_bt2 python3 ./tests/utils/python/testrunner.py \ +$ ./tests/utils/run-python-bt2.sh python3 ./tests/utils/python/testrunner.py \ ./tests/bindings/python/bt2/ -t test_value.RealValueTestCase.test_assign_pos_int ---- diff --git a/tests/Makefile.am b/tests/Makefile.am index 844baa25..baed64e6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -13,6 +13,7 @@ EXTRA_DIST = $(srcdir)/data \ bindings/python/bt2/.coveragerc dist_check_SCRIPTS = \ + bindings/python/bt2/test-python-bt2.sh \ bindings/python/bt2/test_clock_class.py \ bindings/python/bt2/test_component_class.py \ bindings/python/bt2/test_component.py \ @@ -30,7 +31,6 @@ dist_check_SCRIPTS = \ bindings/python/bt2/test_packet.py \ bindings/python/bt2/test_plugin.py \ bindings/python/bt2/test_port.py \ - bindings/python/bt2/test_python_bt2 \ bindings/python/bt2/test_query_executor.py \ bindings/python/bt2/test_stream_class.py \ bindings/python/bt2/test_stream.py \ @@ -38,134 +38,134 @@ dist_check_SCRIPTS = \ bindings/python/bt2/test_trace.py \ bindings/python/bt2/test_value.py \ bindings/python/bt2/utils.py \ - cli/convert/test_auto_source_discovery_grouping \ - cli/convert/test_auto_source_discovery_params \ - cli/convert/test_auto_source_discovery_log_level \ - cli/convert/test_convert_args \ - cli/list-plugins/test_list_plugins \ - cli/params/test_params \ - cli/query/test_query \ - cli/test_exit_status \ - cli/test_help \ - cli/test_intersection \ - cli/test_output_ctf_metadata \ - cli/test_output_path_ctf_non_lttng_trace \ - cli/test_packet_seq_num \ - cli/test_trace_copy \ - cli/test_trace_read \ - cli/test_trimmer \ - plugins/sink.text.details/succeed/test_succeed \ - plugins/sink.text.pretty/test_enum \ + cli/convert/test-auto-source-discovery-grouping.sh \ + cli/convert/test-auto-source-discovery-params.sh \ + cli/convert/test-auto-source-discovery-log-level.sh \ + cli/convert/test-convert-args.sh \ + cli/list-plugins/test-list-plugins.sh \ + cli/params/test-params.sh \ + cli/query/test-query.sh \ + cli/test-exit-status.sh \ + cli/test-help.sh \ + cli/test-intersection.sh \ + cli/test-output-ctf-metadata.sh \ + cli/test-output-path-ctf-non-lttng-trace.sh \ + cli/test-packet-seq-num.sh \ + cli/test-trace-copy.sh \ + cli/test-trace-read.sh \ + cli/test-trimmer.sh \ + plugins/sink.text.details/succeed/test-succeed.sh \ + plugins/sink.text.pretty/test-enum.sh \ plugins/sink.text.pretty/test_pretty.py \ - plugins/sink.text.pretty/test_pretty_python \ - plugins/src.ctf.lttng-live/test_live \ + plugins/sink.text.pretty/test-pretty-python.sh \ + plugins/src.ctf.lttng-live/test-live.sh \ python-plugin-provider/bt_plugin_test_python_plugin_provider.py \ - python-plugin-provider/test_python_plugin_provider \ + python-plugin-provider/test-python-plugin-provider.sh \ python-plugin-provider/test_python_plugin_provider.py TESTS_BINDINGS = if ENABLE_PYTHON_BINDINGS -TESTS_BINDINGS += bindings/python/bt2/test_python_bt2 +TESTS_BINDINGS += bindings/python/bt2/test-python-bt2.sh endif TESTS_CLI = \ - cli/convert/test_convert_args \ - cli/test_help \ - cli/test_intersection \ - cli/test_output_ctf_metadata \ - cli/test_output_path_ctf_non_lttng_trace \ - cli/test_packet_seq_num \ - cli/test_trace_copy \ - cli/test_trace_read \ - cli/test_trimmer + cli/convert/test-convert-args.sh \ + cli/test-help.sh \ + cli/test-intersection.sh \ + cli/test-output-ctf-metadata.sh \ + cli/test-output-path-ctf-non-lttng-trace.sh \ + cli/test-packet-seq-num.sh \ + cli/test-trace-copy.sh \ + cli/test-trace-read.sh \ + cli/test-trimmer.sh TESTS_LIB = \ - lib/test_bt_uuid \ - lib/test_bt_values \ - lib/test_fields \ - lib/test_graph_topo \ - lib/test_remove_destruction_listener_in_destruction_listener \ - lib/test_simple_sink \ - lib/test_trace_ir_ref + lib/test-bt-uuid \ + lib/test-bt-values \ + lib/test-fields.sh \ + lib/test-graph-topo \ + lib/test-remove-destruction-listener-in-destruction-listener \ + lib/test-simple-sink \ + lib/test-trace-ir-ref TESTS_BITFIELD = \ - bitfield/test_bitfield + bitfield/test-bitfield TESTS_CTF_WRITER = \ - ctf-writer/test_ctf_writer + ctf-writer/test-ctf-writer.sh if !ENABLE_BUILT_IN_PLUGINS -TESTS_LIB += lib/test_plugin +TESTS_LIB += lib/test-plugin.sh endif TESTS_PLUGINS = \ - plugins/src.ctf.fs/fail/test_fail \ - plugins/src.ctf.fs/succeed/test_succeed \ - plugins/src.ctf.fs/test_deterministic_ordering \ - plugins/sink.ctf.fs/succeed/test_succeed \ - plugins/sink.text.details/succeed/test_succeed + plugins/src.ctf.fs/fail/test-fail.sh \ + plugins/src.ctf.fs/succeed/test-succeed.sh \ + plugins/src.ctf.fs/test-deterministic-ordering.sh \ + plugins/sink.ctf.fs/succeed/test-succeed.sh \ + plugins/sink.text.details/succeed/test-succeed.sh if !ENABLE_BUILT_IN_PLUGINS if ENABLE_PYTHON_BINDINGS -TESTS_PLUGINS += plugins/src.ctf.fs/query/test_query_support_info -TESTS_PLUGINS += plugins/src.ctf.fs/query/test_query_trace_info -TESTS_PLUGINS += plugins/src.ctf.fs/query/test_query_metadata_info -TESTS_PLUGINS += plugins/sink.ctf.fs/test_assume_single_trace -TESTS_PLUGINS += plugins/sink.ctf.fs/test_stream_names +TESTS_PLUGINS += plugins/src.ctf.fs/query/test-query-support-info.sh +TESTS_PLUGINS += plugins/src.ctf.fs/query/test-query-trace-info.sh +TESTS_PLUGINS += plugins/src.ctf.fs/query/test-query-metadata-info.sh +TESTS_PLUGINS += plugins/sink.ctf.fs/test-assume-single-trace.sh +TESTS_PLUGINS += plugins/sink.ctf.fs/test-stream-names.sh endif endif if ENABLE_DEBUG_INFO TESTS_PLUGINS += \ - plugins/flt.lttng-utils.debug-info/test_dwarf_i386-linux-gnu \ - plugins/flt.lttng-utils.debug-info/test_dwarf_powerpc-linux-gnu \ - plugins/flt.lttng-utils.debug-info/test_dwarf_powerpc64le-linux-gnu \ - plugins/flt.lttng-utils.debug-info/test_dwarf_x86_64-linux-gnu \ - plugins/flt.lttng-utils.debug-info/test_bin_info_i386-linux-gnu \ - plugins/flt.lttng-utils.debug-info/test_bin_info_powerpc-linux-gnu \ - plugins/flt.lttng-utils.debug-info/test_bin_info_powerpc64le-linux-gnu \ - plugins/flt.lttng-utils.debug-info/test_bin_info_x86_64-linux-gnu + plugins/flt.lttng-utils.debug-info/test-dwarf-i386-linux-gnu.sh \ + plugins/flt.lttng-utils.debug-info/test-dwarf-powerpc-linux-gnu.sh \ + plugins/flt.lttng-utils.debug-info/test-dwarf-powerpc64le-linux-gnu.sh \ + plugins/flt.lttng-utils.debug-info/test-dwarf-x86-64-linux-gnu.sh \ + plugins/flt.lttng-utils.debug-info/test-bin-info-i386-linux-gnu.sh \ + plugins/flt.lttng-utils.debug-info/test-bin-info-powerpc-linux-gnu.sh \ + plugins/flt.lttng-utils.debug-info/test-bin-info-powerpc64le-linux-gnu.sh \ + plugins/flt.lttng-utils.debug-info/test-bin-info-x86-64-linux-gnu.sh endif if ENABLE_PYTHON_PLUGINS if ENABLE_PYTHON_BINDINGS TESTS_CLI += \ - cli/convert/test_auto_source_discovery_grouping \ - cli/convert/test_auto_source_discovery_log_level \ - cli/convert/test_auto_source_discovery_params \ - cli/list-plugins/test_list_plugins \ - cli/params/test_params \ - cli/query/test_query \ - cli/test_exit_status - -TESTS_PLUGINS += plugins/flt.utils.trimmer/test_trimming \ - plugins/flt.utils.muxer/succeed/test_succeed \ - plugins/sink.text.pretty/test_enum + cli/convert/test-auto-source-discovery-grouping.sh \ + cli/convert/test-auto-source-discovery-log-level.sh \ + cli/convert/test-auto-source-discovery-params.sh \ + cli/list-plugins/test-list-plugins.sh \ + cli/params/test-params.sh \ + cli/query/test-query.sh \ + cli/test-exit-status.sh + +TESTS_PLUGINS += plugins/flt.utils.trimmer/test-trimming.sh \ + plugins/flt.utils.muxer/succeed/test-succeed.sh \ + plugins/sink.text.pretty/test-enum.sh endif endif if HAVE_PYTHON -TESTS_PLUGINS += plugins/src.ctf.lttng-live/test_live +TESTS_PLUGINS += plugins/src.ctf.lttng-live/test-live.sh if DEV_MODE -TESTS_LIB += lib/conds/test_conds +TESTS_LIB += lib/conds/test-conds.sh endif endif TESTS_PYTHON_PLUGIN_PROVIDER = if ENABLE_PYTHON_PLUGINS -TESTS_PYTHON_PLUGIN_PROVIDER += python-plugin-provider/test_python_plugin_provider -TESTS_PLUGINS += plugins/sink.text.pretty/test_pretty_python +TESTS_PYTHON_PLUGIN_PROVIDER += python-plugin-provider/test-python-plugin-provider.sh +TESTS_PLUGINS += plugins/sink.text.pretty/test-pretty-python.sh if ENABLE_DEBUG_INFO TESTS_PLUGINS += \ - plugins/flt.lttng-utils.debug-info/test_succeed + plugins/flt.lttng-utils.debug-info/test-succeed.sh endif endif TESTS_PARAM_VALIDATION = \ - param-validation/test_param_validation + param-validation/test-param-validation LOG_DRIVER_FLAGS = --merge --comments LOG_DRIVER = env AM_TAP_AWK='$(AWK)' \ diff --git a/tests/bindings/python/bt2/test_python_bt2 b/tests/bindings/python/bt2/test-python-bt2.sh similarity index 100% rename from tests/bindings/python/bt2/test_python_bt2 rename to tests/bindings/python/bt2/test-python-bt2.sh diff --git a/tests/bitfield/Makefile.am b/tests/bitfield/Makefile.am index 42cbc284..f9f3d9e5 100644 --- a/tests/bitfield/Makefile.am +++ b/tests/bitfield/Makefile.am @@ -2,9 +2,9 @@ AM_CPPFLAGS += -I$(top_srcdir)/tests/utils -test_bitfield_SOURCES = test_bitfield.c +test_bitfield_SOURCES = test-bitfield.c test_bitfield_LDADD = \ $(top_builddir)/tests/utils/tap/libtap.la \ $(top_builddir)/tests/utils/libtestcommon.la -noinst_PROGRAMS = test_bitfield +noinst_PROGRAMS = test-bitfield diff --git a/tests/bitfield/test_bitfield.c b/tests/bitfield/test-bitfield.c similarity index 100% rename from tests/bitfield/test_bitfield.c rename to tests/bitfield/test-bitfield.c diff --git a/tests/cli/convert/test_auto_source_discovery_grouping b/tests/cli/convert/test-auto-source-discovery-grouping.sh similarity index 100% rename from tests/cli/convert/test_auto_source_discovery_grouping rename to tests/cli/convert/test-auto-source-discovery-grouping.sh diff --git a/tests/cli/convert/test_auto_source_discovery_log_level b/tests/cli/convert/test-auto-source-discovery-log-level.sh similarity index 100% rename from tests/cli/convert/test_auto_source_discovery_log_level rename to tests/cli/convert/test-auto-source-discovery-log-level.sh diff --git a/tests/cli/convert/test_auto_source_discovery_params b/tests/cli/convert/test-auto-source-discovery-params.sh similarity index 100% rename from tests/cli/convert/test_auto_source_discovery_params rename to tests/cli/convert/test-auto-source-discovery-params.sh diff --git a/tests/cli/convert/test_convert_args b/tests/cli/convert/test-convert-args.sh similarity index 99% rename from tests/cli/convert/test_convert_args rename to tests/cli/convert/test-convert-args.sh index cd7aab24..eee251de 100755 --- a/tests/cli/convert/test_convert_args +++ b/tests/cli/convert/test-convert-args.sh @@ -16,8 +16,8 @@ fi # shellcheck source=../../utils/utils.sh source "$UTILSSH" -tmp_stdout=$(mktemp -t test_convert_args_stdout.XXXXXX) -tmp_stderr=$(mktemp -t test_convert_args_stderr.XXXXXX) +tmp_stdout=$(mktemp -t test-convert-args-stdout.XXXXXX) +tmp_stderr=$(mktemp -t test-convert-args-stderr.XXXXXX) test_bt_convert_run_args() { local what="$1" diff --git a/tests/cli/list-plugins/test_list_plugins b/tests/cli/list-plugins/test-list-plugins.sh similarity index 85% rename from tests/cli/list-plugins/test_list_plugins rename to tests/cli/list-plugins/test-list-plugins.sh index 595eb4db..a0720ace 100755 --- a/tests/cli/list-plugins/test_list_plugins +++ b/tests/cli/list-plugins/test-list-plugins.sh @@ -19,10 +19,10 @@ plan_tests 3 data_dir="${BT_TESTS_DATADIR}/cli/list-plugins" plugin_dir="${data_dir}" -stdout_file=$(mktemp -t test_cli_list_plugins_stdout.XXXXXX) -stderr_file=$(mktemp -t test_cli_list_plugins_stderr.XXXXXX) -grep_stdout_file=$(mktemp -t test_cli_list_plugins_grep_stdout.XXXXXX) -py_plugin_expected_stdout_file=$(mktemp -t test_cli_list_plugins_expected_py_plugin_stdout.XXXXXX) +stdout_file=$(mktemp -t test-cli-list-plugins-stdout.XXXXXX) +stderr_file=$(mktemp -t test-cli-list-plugins-stderr.XXXXXX) +grep_stdout_file=$(mktemp -t test-cli-list-plugins-grep-stdout.XXXXXX) +py_plugin_expected_stdout_file=$(mktemp -t test-cli-list-plugins-expected-py-plugin-stdout.XXXXXX) # Run list-plugins. bt_cli "$stdout_file" "$stderr_file" \ diff --git a/tests/cli/params/test_params b/tests/cli/params/test-params.sh similarity index 100% rename from tests/cli/params/test_params rename to tests/cli/params/test-params.sh diff --git a/tests/cli/query/test_query b/tests/cli/query/test-query.sh similarity index 92% rename from tests/cli/query/test_query rename to tests/cli/query/test-query.sh index e44d6777..170749ab 100755 --- a/tests/cli/query/test_query +++ b/tests/cli/query/test-query.sh @@ -21,9 +21,9 @@ plan_tests $NUM_TESTS data_dir="${BT_TESTS_DATADIR}/cli/query" plugin_dir="${data_dir}" -stdout_expected_file=$(mktemp -t test_cli_query_stdout_xpected.XXXXXX) -stdout_file=$(mktemp -t test_cli_query_stdout.XXXXXX) -stderr_file=$(mktemp -t test_cli_query_stderr.XXXXXX) +stdout_expected_file=$(mktemp -t test-cli-query-stdout-expected.XXXXXX) +stdout_file=$(mktemp -t test-cli-query-stdout.XXXXXX) +stderr_file=$(mktemp -t test-cli-query-stderr.XXXXXX) expect_success() { local expected_str="$1" diff --git a/tests/cli/test_exit_status b/tests/cli/test-exit-status.sh similarity index 79% rename from tests/cli/test_exit_status rename to tests/cli/test-exit-status.sh index 905a2eb3..adfce3c3 100755 --- a/tests/cli/test_exit_status +++ b/tests/cli/test-exit-status.sh @@ -16,16 +16,16 @@ fi # shellcheck source=../utils/utils.sh source "$UTILSSH" -data_dir="$BT_TESTS_DATADIR/cli/exit_status" -source_name="src.test_exit_status.StatusSrc" +data_dir="$BT_TESTS_DATADIR/cli/exit-status" +source_name="src.test-exit-status.StatusSrc" test_interrupted_graph() { local cli_args=("--plugin-path=$data_dir" "-c" "$source_name" "-p" "case=\"INTERRUPTED\"") local actual_stdout local actual_stderr - actual_stdout=$(mktemp -t test_cli_exit_status_stdout_actual.XXXXXX) - actual_stderr=$(mktemp -t test_cli_exit_status_stderr_actual.XXXXXX) + actual_stdout=$(mktemp -t test-cli-exit-status-stdout-actual.XXXXXX) + actual_stderr=$(mktemp -t test-cli-exit-status-stderr-actual.XXXXXX) bt_cli "$actual_stdout" "$actual_stderr" "${cli_args[@]}" @@ -46,8 +46,8 @@ test_error_graph() { local actual_stdout local actual_stderr - actual_stdout=$(mktemp -t test_cli_exit_status_stdout_actual.XXXXXX) - actual_stderr=$(mktemp -t test_cli_exit_status_stderr_actual.XXXXXX) + actual_stdout=$(mktemp -t test-cli-exit-status-stdout-actual.XXXXXX) + actual_stderr=$(mktemp -t test-cli-exit-status-stderr-actual.XXXXXX) bt_cli "$actual_stdout" "$actual_stderr" "${cli_args[@]}" @@ -68,8 +68,8 @@ test_stop_graph() { local actual_stdout local actual_stderr - actual_stdout=$(mktemp -t test_cli_exit_status_stdout_actual.XXXXXX) - actual_stderr=$(mktemp -t test_cli_exit_status_stderr_actual.XXXXXX) + actual_stdout=$(mktemp -t test-cli-exit-status-stdout-actual.XXXXXX) + actual_stderr=$(mktemp -t test-cli-exit-status-stderr-actual.XXXXXX) bt_cli "$actual_stdout" "$actual_stderr" "${cli_args[@]}" diff --git a/tests/cli/test_help b/tests/cli/test-help.sh similarity index 97% rename from tests/cli/test_help rename to tests/cli/test-help.sh index dca6cfe5..dabd0c2b 100755 --- a/tests/cli/test_help +++ b/tests/cli/test-help.sh @@ -18,8 +18,8 @@ source "$UTILSSH" plan_tests 21 -stdout=$(mktemp -t test_help_stdout.XXXXXX) -stderr=$(mktemp -t test_help_stderr.XXXXXX) +stdout=$(mktemp -t test-help-stdout.XXXXXX) +stderr=$(mktemp -t test-help-stderr.XXXXXX) # Return 0 if file "$1" exists and is empty, non-0 otherwise. diff --git a/tests/cli/test_intersection b/tests/cli/test-intersection.sh similarity index 95% rename from tests/cli/test_intersection rename to tests/cli/test-intersection.sh index df0f6504..32a63d58 100755 --- a/tests/cli/test_intersection +++ b/tests/cli/test-intersection.sh @@ -18,8 +18,8 @@ source "$UTILSSH" plan_tests 20 -stdout=$(mktemp -t test_intersection_stdout.XXXXXX) -stderr=$(mktemp -t test_intersection_stderr.XXXXXX) +stdout=$(mktemp -t test-intersection-stdout.XXXXXX) +stderr=$(mktemp -t test-intersection-stderr.XXXXXX) test_intersect() { local trace="$1" diff --git a/tests/cli/test_output_ctf_metadata b/tests/cli/test-output-ctf-metadata.sh similarity index 93% rename from tests/cli/test_output_ctf_metadata rename to tests/cli/test-output-ctf-metadata.sh index 8296506b..f85fc053 100755 --- a/tests/cli/test_output_ctf_metadata +++ b/tests/cli/test-output-ctf-metadata.sh @@ -26,7 +26,7 @@ tmp_metadata=$(mktemp) "${BT_TESTS_BT2_BIN}" -o ctf-metadata "${BT_CTF_TRACES_PATH}/succeed/wk-heartbeat-u" > "$tmp_metadata" ok $? "Run babeltrace -o ctf-metadata with a valid trace directory, correct exit status" -bt_diff "${BT_TESTS_DATADIR}/cli/test_output_ctf_metadata.ref" "$tmp_metadata" +bt_diff "${BT_TESTS_DATADIR}/cli/test-output-ctf-metadata.ref" "$tmp_metadata" ok $? "Run babeltrace -o ctf-metadata with a valid trace directory, correct output" # Test an invalid trace directory. diff --git a/tests/cli/test_output_path_ctf_non_lttng_trace b/tests/cli/test-output-path-ctf-non-lttng-trace.sh similarity index 89% rename from tests/cli/test_output_path_ctf_non_lttng_trace rename to tests/cli/test-output-path-ctf-non-lttng-trace.sh index fc0158bf..d589dbe1 100755 --- a/tests/cli/test_output_path_ctf_non_lttng_trace +++ b/tests/cli/test-output-path-ctf-non-lttng-trace.sh @@ -28,8 +28,8 @@ source "$UTILSSH" plan_tests 3 -temp_input_dir=$(mktemp -t -d test_output_path_ctf_non_lttng_trace_input.XXXXXX) -temp_output_dir=$(mktemp -t -d test_output_path_ctf_non_lttng_trace_output.XXXXXX) +temp_input_dir=$(mktemp -t -d test-output-path-ctf-non-lttng-trace-input.XXXXXX) +temp_output_dir=$(mktemp -t -d test-output-path-ctf-non-lttng-trace-output.XXXXXX) mkdir -p "${temp_input_dir}/a/b/c" cp -a "${BT_CTF_TRACES_PATH}/intersection/3eventsintersect" "${temp_input_dir}/a/b/c" diff --git a/tests/cli/test_packet_seq_num b/tests/cli/test-packet-seq-num.sh similarity index 81% rename from tests/cli/test_packet_seq_num rename to tests/cli/test-packet-seq-num.sh index 341a9c26..89a830e5 100755 --- a/tests/cli/test_packet_seq_num +++ b/tests/cli/test-packet-seq-num.sh @@ -54,16 +54,16 @@ test_lost() { diag "Test the packet_seq_num validation" diag "No packet lost" -test_no_lost "${BT_CTF_TRACES_PATH}/packet_seq_num/no_lost" +test_no_lost "${BT_CTF_TRACES_PATH}/packet-seq-num/no-lost" diag "No packet lost, packet_seq_num not starting at 0" -test_no_lost "${BT_CTF_TRACES_PATH}/packet_seq_num/no_lost_not_starting_at_0" +test_no_lost "${BT_CTF_TRACES_PATH}/packet-seq-num/no-lost-not-starting-at-0" diag "1 stream, 2 packets lost before the last packet" -test_lost "${BT_CTF_TRACES_PATH}/packet_seq_num/2_lost_before_last" "2" +test_lost "${BT_CTF_TRACES_PATH}/packet-seq-num/2-lost-before-last" "2" diag "2 streams, packets lost in one of them" -test_lost "${BT_CTF_TRACES_PATH}/packet_seq_num/2_streams_lost_in_1" "2" +test_lost "${BT_CTF_TRACES_PATH}/packet-seq-num/2-streams-lost-in-1" "2" diag "2 streams, packets lost in both" -test_lost "${BT_CTF_TRACES_PATH}/packet_seq_num/2_streams_lost_in_2" "2,3,1" +test_lost "${BT_CTF_TRACES_PATH}/packet-seq-num/2-streams-lost-in-2" "2,3,1" diff --git a/tests/cli/test_trace_copy b/tests/cli/test-trace-copy.sh similarity index 100% rename from tests/cli/test_trace_copy rename to tests/cli/test-trace-copy.sh diff --git a/tests/cli/test_trace_read b/tests/cli/test-trace-read.sh similarity index 100% rename from tests/cli/test_trace_read rename to tests/cli/test-trace-read.sh diff --git a/tests/cli/test_trimmer b/tests/cli/test-trimmer.sh similarity index 100% rename from tests/cli/test_trimmer rename to tests/cli/test-trimmer.sh diff --git a/tests/ctf-writer/Makefile.am b/tests/ctf-writer/Makefile.am index c6c3ebab..807f54db 100644 --- a/tests/ctf-writer/Makefile.am +++ b/tests/ctf-writer/Makefile.am @@ -2,9 +2,9 @@ AM_CPPFLAGS += -I$(top_srcdir)/tests/utils -noinst_PROGRAMS = ctf_writer +noinst_PROGRAMS = ctf-writer -ctf_writer_SOURCES = ctf_writer.c +ctf_writer_SOURCES = ctf-writer.c ctf_writer_LDADD = \ $(top_builddir)/tests/utils/tap/libtap.la \ $(top_builddir)/tests/utils/libtestcommon.la \ @@ -13,4 +13,4 @@ ctf_writer_LDADD = \ $(top_builddir)/src/logging/liblogging.la -dist_check_SCRIPTS = test_ctf_writer +dist_check_SCRIPTS = test-ctf-writer.sh diff --git a/tests/ctf-writer/ctf_writer.c b/tests/ctf-writer/ctf-writer.c similarity index 100% rename from tests/ctf-writer/ctf_writer.c rename to tests/ctf-writer/ctf-writer.c diff --git a/tests/ctf-writer/test_ctf_writer b/tests/ctf-writer/test-ctf-writer.sh similarity index 83% rename from tests/ctf-writer/test_ctf_writer rename to tests/ctf-writer/test-ctf-writer.sh index 7616b691..38a41927 100755 --- a/tests/ctf-writer/test_ctf_writer +++ b/tests/ctf-writer/test-ctf-writer.sh @@ -14,4 +14,4 @@ fi # shellcheck source=../utils/utils.sh source "$UTILSSH" -"${BT_TESTS_BUILDDIR}/ctf-writer/ctf_writer" "$BT_TESTS_BT2_BIN" +"${BT_TESTS_BUILDDIR}/ctf-writer/ctf-writer" "$BT_TESTS_BT2_BIN" diff --git a/tests/data/cli/exit_status/bt_plugin_test_cli_exit_status.py b/tests/data/cli/exit-status/bt_plugin_test_cli_exit_status.py similarity index 96% rename from tests/data/cli/exit_status/bt_plugin_test_cli_exit_status.py rename to tests/data/cli/exit-status/bt_plugin_test_cli_exit_status.py index 327d052b..37f48baf 100644 --- a/tests/data/cli/exit_status/bt_plugin_test_cli_exit_status.py +++ b/tests/data/cli/exit-status/bt_plugin_test_cli_exit_status.py @@ -9,7 +9,7 @@ import signal import bt2 -bt2.register_plugin(__name__, "test_exit_status") +bt2.register_plugin(__name__, "test-exit-status") class StatusIter(bt2._UserMessageIterator): diff --git a/tests/data/cli/test_output_ctf_metadata.ref b/tests/data/cli/test-output-ctf-metadata.ref similarity index 100% rename from tests/data/cli/test_output_ctf_metadata.ref rename to tests/data/cli/test-output-ctf-metadata.ref diff --git a/tests/data/ctf-traces/live/split_metadata/channel0_0 b/tests/data/ctf-traces/live/split-metadata/channel0_0 similarity index 100% rename from tests/data/ctf-traces/live/split_metadata/channel0_0 rename to tests/data/ctf-traces/live/split-metadata/channel0_0 diff --git a/tests/data/ctf-traces/live/split_metadata/index/channel0_0.idx b/tests/data/ctf-traces/live/split-metadata/index/channel0_0.idx similarity index 100% rename from tests/data/ctf-traces/live/split_metadata/index/channel0_0.idx rename to tests/data/ctf-traces/live/split-metadata/index/channel0_0.idx diff --git a/tests/data/ctf-traces/live/split_metadata/metadata b/tests/data/ctf-traces/live/split-metadata/metadata similarity index 100% rename from tests/data/ctf-traces/live/split_metadata/metadata rename to tests/data/ctf-traces/live/split-metadata/metadata diff --git a/tests/data/ctf-traces/live/stored_values.mctf b/tests/data/ctf-traces/live/stored-values.mctf similarity index 100% rename from tests/data/ctf-traces/live/stored_values.mctf rename to tests/data/ctf-traces/live/stored-values.mctf diff --git a/tests/data/ctf-traces/packet_seq_num/2_lost_before_last/metadata b/tests/data/ctf-traces/packet-seq-num/2-lost-before-last/metadata similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/2_lost_before_last/metadata rename to tests/data/ctf-traces/packet-seq-num/2-lost-before-last/metadata diff --git a/tests/data/ctf-traces/packet_seq_num/2_lost_before_last/test_stream_0 b/tests/data/ctf-traces/packet-seq-num/2-lost-before-last/test_stream_0 similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/2_lost_before_last/test_stream_0 rename to tests/data/ctf-traces/packet-seq-num/2-lost-before-last/test_stream_0 diff --git a/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/metadata b/tests/data/ctf-traces/packet-seq-num/2-streams-lost-in-1/metadata similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/metadata rename to tests/data/ctf-traces/packet-seq-num/2-streams-lost-in-1/metadata diff --git a/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_0 b/tests/data/ctf-traces/packet-seq-num/2-streams-lost-in-1/test_stream_0 similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_0 rename to tests/data/ctf-traces/packet-seq-num/2-streams-lost-in-1/test_stream_0 diff --git a/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_1 b/tests/data/ctf-traces/packet-seq-num/2-streams-lost-in-1/test_stream_1 similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_1 rename to tests/data/ctf-traces/packet-seq-num/2-streams-lost-in-1/test_stream_1 diff --git a/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/metadata b/tests/data/ctf-traces/packet-seq-num/2-streams-lost-in-2/metadata similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/metadata rename to tests/data/ctf-traces/packet-seq-num/2-streams-lost-in-2/metadata diff --git a/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_0 b/tests/data/ctf-traces/packet-seq-num/2-streams-lost-in-2/test_stream_0 similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_0 rename to tests/data/ctf-traces/packet-seq-num/2-streams-lost-in-2/test_stream_0 diff --git a/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_1 b/tests/data/ctf-traces/packet-seq-num/2-streams-lost-in-2/test_stream_1 similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_1 rename to tests/data/ctf-traces/packet-seq-num/2-streams-lost-in-2/test_stream_1 diff --git a/tests/data/ctf-traces/packet_seq_num/7_lost_between_2_with_index/index/stream_0.idx b/tests/data/ctf-traces/packet-seq-num/7-lost-between-2-with-index/index/stream_0.idx similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/7_lost_between_2_with_index/index/stream_0.idx rename to tests/data/ctf-traces/packet-seq-num/7-lost-between-2-with-index/index/stream_0.idx diff --git a/tests/data/ctf-traces/packet_seq_num/7_lost_between_2_with_index/metadata b/tests/data/ctf-traces/packet-seq-num/7-lost-between-2-with-index/metadata similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/7_lost_between_2_with_index/metadata rename to tests/data/ctf-traces/packet-seq-num/7-lost-between-2-with-index/metadata diff --git a/tests/data/ctf-traces/packet_seq_num/7_lost_between_2_with_index/stream_0 b/tests/data/ctf-traces/packet-seq-num/7-lost-between-2-with-index/stream_0 similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/7_lost_between_2_with_index/stream_0 rename to tests/data/ctf-traces/packet-seq-num/7-lost-between-2-with-index/stream_0 diff --git a/tests/data/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/metadata b/tests/data/ctf-traces/packet-seq-num/no-lost-not-starting-at-0/metadata similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/metadata rename to tests/data/ctf-traces/packet-seq-num/no-lost-not-starting-at-0/metadata diff --git a/tests/data/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/test_stream_0 b/tests/data/ctf-traces/packet-seq-num/no-lost-not-starting-at-0/test_stream_0 similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/test_stream_0 rename to tests/data/ctf-traces/packet-seq-num/no-lost-not-starting-at-0/test_stream_0 diff --git a/tests/data/ctf-traces/packet_seq_num/no_lost/metadata b/tests/data/ctf-traces/packet-seq-num/no-lost/metadata similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/no_lost/metadata rename to tests/data/ctf-traces/packet-seq-num/no-lost/metadata diff --git a/tests/data/ctf-traces/packet_seq_num/no_lost/test_stream_0 b/tests/data/ctf-traces/packet-seq-num/no-lost/test_stream_0 similarity index 100% rename from tests/data/ctf-traces/packet_seq_num/no_lost/test_stream_0 rename to tests/data/ctf-traces/packet-seq-num/no-lost/test_stream_0 diff --git a/tests/data/ctf-traces/succeed/debug-info/channel0_0 b/tests/data/ctf-traces/succeed/debug-info/channel0_0 index 35b979b20c24d1e165f9fd8f3707de247996bbd3..1186c4bc765e43f5a7ec17d3c04361a631b55422 100644 GIT binary patch delta 12 TcmZorXi%82k5PByen)-)9k&F1 delta 12 TcmZorXi%82k1>AZen)-)9