NOFAIL $MATCHES -N "fork - after_exec" "^ust.after_exec:" $trace_loc
NOFAIL check_trace_logs "$trace_loc"
-starttest "libmallocwrap"
-NOFAIL usttrace -lm $TESTDIR/test-libmallocwrap/.libs/prog
+starttest "libustinstr-malloc"
+NOFAIL usttrace -lm $TESTDIR/test-libustinstr-malloc/.libs/prog
trace_loc=$(usttrace -W)
-NOFAIL $MATCHES -N "mallocwrap - malloc" -n 1000 "^ust.malloc:.*{ size = 1[0-9][0-9][0-9]," $trace_loc
+NOFAIL $MATCHES -N "libustinstr-malloc - malloc" -n 1000 "^ust.malloc:.*{ size = 1[0-9][0-9][0-9]," $trace_loc
NOFAIL check_trace_logs "$trace_loc"
### Manual mode test
ustd --pidfile "$pidfilepath" -o "$TRACE_DIR" >/dev/null 2>&1 &
USTD_PID="$(<$pidfilepath)"
-LD_PRELOAD=/usr/local/lib/libust.so.0.0.0:/usr/local/lib/libmallocwrap.so find / >/dev/null 2>&1 &
+LD_PRELOAD=/usr/local/lib/libust.so.0.0.0:/usr/local/lib/libustinstr-malloc.so find / >/dev/null 2>&1 &
PID=$!
sleep 0.1
NOFAIL ustctl --list-markers "$PID" >/dev/null
echo "Valgrind output is in $VALG_OUT"
NOFAIL [ -z "$(<$VALG_OUT)" ]
+### dlopen ###
+starttest "dlopen"
+LD_LIBRARY_PATH=$TESTDIR/dlopen/.libs NOFAIL usttrace $TESTDIR/dlopen/dlopen
+trace_loc=$(usttrace -W)
+NOFAIL $MATCHES -N "from_library" -n 1 "^ust.from_library:" $trace_loc
+NOFAIL $MATCHES -N "from_main_before_lib" -n 1 "^ust.from_main_before_lib:" $trace_loc
+NOFAIL $MATCHES -N "from_main_after_lib" -n 1 "^ust.from_main_after_lib:" $trace_loc
+
+### same-line-marker ###
+starttest "same_line_marker"
+NOFAIL usttrace $TESTDIR/same_line_marker/same_line_marker
+trace_loc=$(usttrace -W)
+NOFAIL $MATCHES -N "same_line_event" -n 2 "^ust.same_line_event:" $trace_loc
+
+
echo "************************************"
echo "$0: All passed"
echo "************************************"