Dmitry V. Levin
495f525d68
* tests/dumpio.expected: New file. * tests/unix-pair-send-recv.c: New file. * tests/dumpio.test: New test. * tests/Makefile.am (check_PROGRAMS): Add unix-pair-send-recv. (TESTS): Add dumpio.test. (EXTRA_DIST): Add dumpio.expected. * tests/.gitignore: Add unix-pair-send-recv.
27 lines
527 B
Bash
Executable File
27 lines
527 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Check how dumpio works.
|
|
|
|
. "${srcdir=.}/init.sh"
|
|
|
|
dumpio_expected="${srcdir=.}/dumpio.expected"
|
|
cat "$dumpio_expected" > /dev/null ||
|
|
fail_ "$dumpio_expected is not available"
|
|
|
|
check_prog diff
|
|
|
|
args='./unix-pair-send-recv abcdefghijklmnopqrstuvwxyz'
|
|
$args ||
|
|
fail_ "$args failed"
|
|
|
|
args="-esignal=none -esendto,recvfrom -eread=0 -ewrite=0 $args"
|
|
$STRACE -o "$LOG" $args || {
|
|
cat "$LOG"
|
|
fail_ "$STRACE $args failed"
|
|
}
|
|
|
|
diff "$dumpio_expected" "$LOG" ||
|
|
fail_ "$STRACE $args failed to dump i/o properly"
|
|
|
|
exit 0
|