blob: fda1b94ee8412f81dde827909bf28b90081eb353 [file] [log] [blame]
#!/bin/sh
# Check how -o '|pipe' works.
. "${srcdir=.}/init.sh"
OUT="$LOG.out"
EXP="$LOG.exp"
check_prog grep
run_prog grep chdir $srcdir/umovestr.expected > "$EXP"
run_prog ./umovestr
> "$LOG" || fail_ "failed to write $LOG"
$STRACE -o "|cat > $LOG && $SLEEP_A_BIT && grep chdir < $LOG > $OUT" -e chdir $args ||
dump_log_and_fail_with "$STRACE $args failed"
match_diff "$OUT" "$EXP"
rm -f "$EXP" "$OUT"