xref: /aosp_15_r20/external/strace/tests-m32/opipe.test (revision cf84ac9a129d8ea9952db616b4e9b904c4bdde56)
1*cf84ac9aSAndroid Build Coastguard Worker#!/bin/sh
2*cf84ac9aSAndroid Build Coastguard Worker
3*cf84ac9aSAndroid Build Coastguard Worker# Check how -o '|pipe' works.
4*cf84ac9aSAndroid Build Coastguard Worker
5*cf84ac9aSAndroid Build Coastguard Worker. "${srcdir=.}/init.sh"
6*cf84ac9aSAndroid Build Coastguard Worker
7*cf84ac9aSAndroid Build Coastguard Workercheck_prog grep
8*cf84ac9aSAndroid Build Coastguard Workergrep chdir $srcdir/umovestr.expected > "$EXP"
9*cf84ac9aSAndroid Build Coastguard Workerrun_prog ../umovestr
10*cf84ac9aSAndroid Build Coastguard Worker
11*cf84ac9aSAndroid Build Coastguard Worker$STRACE -o "|cat > $LOG && $SLEEP_A_BIT && grep chdir < $LOG > $OUT" -e chdir $args ||
12*cf84ac9aSAndroid Build Coastguard Worker	dump_log_and_fail_with "$STRACE $args failed"
13*cf84ac9aSAndroid Build Coastguard Worker
14*cf84ac9aSAndroid Build Coastguard Workermatch_diff "$OUT" "$EXP"
15