FULL_LTTNG_BIN="${TESTDIR}/../src/bin/lttng/${LTTNG_BIN}"
-tmp_stdout=$(mktemp --tmpdir -t test_remove_triggers_cli_stdout.XXXXXX)
-tmp_stderr=$(mktemp --tmpdir -t test_remove_triggers_cli_stderr.XXXXXX)
-tmp_expected_stdout=$(mktemp --tmpdir -t test_remove_triggers_cli_expected_stdout.XXXXXX)
+tmp_stdout=$(mktemp -t test_remove_triggers_cli_stdout.XXXXXX)
+tmp_stderr=$(mktemp -t test_remove_triggers_cli_stderr.XXXXXX)
+tmp_expected_stdout=$(mktemp -t test_remove_triggers_cli_expected_stdout.XXXXXX)
uid=$(id --user)
gid=$(id --group)
# the one used by the list command. Here we simply validate that a
# simple trigger is correctly generated on removal for MI.
- tmp_stdout_raw=$(mktemp --tmpdir -t "tmp.${FUNCNAME[0]}_stdout.XXXXXX")
- tmp_expected_stdout=$(mktemp --tmpdir -t "tmp.${FUNCNAME[0]}_expected_stdout.XXXXXX")
+ tmp_stdout_raw=$(mktemp -t "tmp.${FUNCNAME[0]}_stdout.XXXXXX")
+ tmp_expected_stdout=$(mktemp -t "tmp.${FUNCNAME[0]}_expected_stdout.XXXXXX")
diag "${FULL_LTTNG_BIN} --mi=xml remove-trigger"
cat > "${tmp_expected_stdout}" <<- EOF
<?xml version="1.0" encoding="UTF-8"?>
- <command xmlns="https://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://lttng.org/xml/ns/lttng-mi https://lttng.org/xml/schemas/lttng-mi/4/lttng-mi-4.0.xsd" schemaVersion="4.0">
+ <command xmlns="https://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://lttng.org/xml/ns/lttng-mi https://lttng.org/xml/schemas/lttng-mi/${MI_XSD_MAJOR_VERSION}/lttng-mi-${MI_XSD_MAJOR_VERSION}.${MI_XSD_MINOR_VERSION}.xsd" schemaVersion="${MI_XSD_MAJOR_VERSION}.${MI_XSD_MINOR_VERSION}">
<name>remove-trigger</name>
<output>
<trigger>
ok $? "remove-trigger mi: exit code is 0"
# Pretty-fy xml before further test.
- $XML_PRETTY_BIN < "${tmp_stdout_raw}" > "${tmp_stdout}"
+ $XML_PRETTY < "${tmp_stdout_raw}" > "${tmp_stdout}"
- $XML_VALIDATE_BIN "${MI_XSD_PATH}" "${tmp_stdout}"
+ $MI_VALIDATE "${tmp_stdout}"
ok $? "remove-trigger mi is valid"
diff -u "${tmp_expected_stdout}" "${tmp_stdout}"