Cleanup: tests: use find's `-name` option instead of grep
[lttng-tools.git] / tests / regression / tools / metadata / test_ust
index cea0d5ced76149d13a4c5860d9937e0dd85a72c4..ba34b7f4c4834c79916551152611cfd9ced969b1 100755 (executable)
@@ -56,7 +56,7 @@ function test_per_uid ()
        # bt1 accepts only a directory while bt2 accepts either the metadata
        # file directly or a directory with an immediate metadata file.
        # Settle for the common denominator.
-       metadata_path=$(find "${expected_path}/${session_name}"* | grep metadata)
+       metadata_path=$(find "${expected_path}/${session_name}"* -name "metadata")
        metadata_path=$(dirname "$metadata_path")
 
        $BABELTRACE_BIN --output-format=ctf-metadata "${metadata_path}" > "$metadata"
@@ -150,7 +150,7 @@ function test_per_pid ()
        # bt1 accepts only a directory while bt2 accepts either the metadata
        # file directly or a directory with an immediate metadata file.
        # Settle for the common denominator.
-       metadata_path=$(find "${expected_path}/${session_name}"* | grep metadata)
+       metadata_path=$(find "${expected_path}/${session_name}"* -name "metadata")
        metadata_path=$(dirname "$metadata_path")
 
        $BABELTRACE_BIN --output-format=ctf-metadata "${metadata_path}" 1> "$metadata"
This page took 0.023418 seconds and 4 git commands to generate.