Cleanup: tests: use find's `-name` option instead of grep
[lttng-tools.git] / tests / regression / tools / metadata / test_kernel
index 8954a7f36b4e230db19d9cd1b25e4472d094d6a7..630fe2d4a4eb4c7b770fbf9c7be2728d43531e0c 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (C) 2019 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
+# Copyright (C) 2019 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
 #
 # SPDX-License-Identifier: LGPL-2.1-only
 
@@ -45,7 +45,7 @@ function test_kernel ()
        # 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"
@@ -119,7 +119,7 @@ skip $isroot "Root access is needed. Skipping all kernel metadata tests." $NUM_T
                ${fct_test}
        done
 
-       rmmod lttng-test
+       modprobe --remove lttng-test
 
        stop_lttng_sessiond
        unset LTTNG_HOME
This page took 0.030215 seconds and 5 git commands to generate.