Tests: fix: list triggers: bc missing on system
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Jul 2021 18:59:02 +0000 (14:59 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Jul 2021 19:02:54 +0000 (15:02 -0400)
`bc` is not part of the test suite's dependancies and can be replaced,
in this instance, by a use of `printf`.

This use of `bc` caused a number of failures on the CI's Lava workers.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I1a1b24a23325754c26ebedfdb6b7728378381d97

tests/regression/tools/trigger/test_list_triggers_cli

index 7355f3897e6c2313c9bfd53955a522a7810f7ab8..162b1328b61b34ec34176a648b894eff9c3efee9 100755 (executable)
@@ -814,7 +814,7 @@ test_event_rule_matches_probe ()
        fi
 
        offset_hex="0x$(printf '%x' $offset)"
-       channel_enable_addr_decimal=$(echo "ibase=16; ${channel_enable_addr^^} " | bc)
+       channel_enable_addr_decimal=$(printf '%u' 0x"${channel_enable_addr}")
 
        lttng_add_trigger_ok "T0" --condition event-rule-matches --type=kprobe --location=lttng_channel_enable --event-name=my_channel_enable --action notify
        lttng_add_trigger_ok "T1" --condition event-rule-matches --type=kprobe --location="${base_symbol}+${offset_hex}" --event-name=my_channel_enable --action notify
This page took 0.02653 seconds and 4 git commands to generate.