summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4be5bab)
This prevents grep of finding matches in the leading directories listed
by find.
It caused problem when I used the "metadata" string in one of the
directory names:
/tmp/tmp.test_regen_metadata_ust_trace_path.6FbwPF/
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I7165a3b4e4a16c793fe51c40484978be3a99dbfc
# 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.
# 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"
metadata_path=$(dirname "$metadata_path")
$BABELTRACE_BIN --output-format=ctf-metadata "${metadata_path}" > "$metadata"
# 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.
# 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"
metadata_path=$(dirname "$metadata_path")
$BABELTRACE_BIN --output-format=ctf-metadata "${metadata_path}" > "$metadata"
# 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.
# 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"
metadata_path=$(dirname "$metadata_path")
$BABELTRACE_BIN --output-format=ctf-metadata "${metadata_path}" 1> "$metadata"
validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/$SESSION_NAME*
# Find the metadata file
validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/$SESSION_NAME*
# Find the metadata file
- metadata_path=$(find "$TRACE_PATH/$HOSTNAME/$SESSION_NAME"* | grep metadata)
+ metadata_path=$(find "$TRACE_PATH/$HOSTNAME/$SESSION_NAME"* -name "metadata")
# Empty the metadata file
echo -n > "$metadata_path"
# Empty the metadata file
echo -n > "$metadata_path"
validate_trace $EVENT_NAME "$TRACE_PATH"
# Find the metadata file
validate_trace $EVENT_NAME "$TRACE_PATH"
# Find the metadata file
- metadata_path=$(find "$TRACE_PATH"* | grep metadata)
+ metadata_path=$(find "$TRACE_PATH"* -name "metadata")
# Empty the metadata file
echo -n > "$metadata_path"
# Empty the metadata file
echo -n > "$metadata_path"
validate_trace $EVENT_NAME "$TRACE_PATH/$HOSTNAME/$SESSION_NAME"*
# Find the metadata file
validate_trace $EVENT_NAME "$TRACE_PATH/$HOSTNAME/$SESSION_NAME"*
# Find the metadata file
- metadata_path=$(find "$TRACE_PATH/$HOSTNAME/$SESSION_NAME"* | grep metadata)
+ metadata_path=$(find "$TRACE_PATH/$HOSTNAME/$SESSION_NAME"* -name "metadata")
# Empty the metadata file
echo -n > "$metadata_path"
# Empty the metadata file
echo -n > "$metadata_path"
validate_trace $EVENT_NAME "$TRACE_PATH"
# Find the metadata file
validate_trace $EVENT_NAME "$TRACE_PATH"
# Find the metadata file
- metadata_path=$(find "$TRACE_PATH"* | grep metadata)
+ metadata_path=$(find "$TRACE_PATH"* -name "metadata")
# Empty the metadata file
echo -n > "$metadata_path"
# Empty the metadata file
echo -n > "$metadata_path"
local nr_event_id=$2
local trace_path=$3
local nr_event_id=$2
local trace_path=$3
- local metadata_file=$(find $trace_path | grep metadata)
+ local metadata_file=$(find $trace_path -name "metadata")
local metadata_path=$(dirname $metadata_file)
which $BABELTRACE_BIN >/dev/null
local metadata_path=$(dirname $metadata_file)
which $BABELTRACE_BIN >/dev/null