Clean-up: modernize pretty_xml.cpp
[lttng-tools.git] / tests / regression / tools / trigger / test_remove_trigger_cli
index f306f114f54d294769d3cf3c7fbc45e8cfa3fbb5..ded80bb9b06e0d3512facddb5fafc53cc070a3e1 100755 (executable)
@@ -27,9 +27,9 @@ plan_tests 22
 
 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)
@@ -73,14 +73,14 @@ function test_mi ()
        # 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>
@@ -124,9 +124,9 @@ function test_mi ()
        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}"
This page took 0.024437 seconds and 4 git commands to generate.