File: test_0102_ls_basic_socket_error.sh

package info (click to toggle)
libsmb2 6.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,992 kB
  • sloc: ansic: 33,026; sh: 221; makefile: 189; cpp: 98
file content (16 lines) | stat: -rwxr-xr-x 564 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

. ./functions.sh

echo "basic ls test with valgrind and session errors"

NUM_CALLS=`libtool --mode=execute strace ./prog_ls "${TESTURL}/" 2>&1 >/dev/null | grep readv |wc -l`

for IDX in `seq 1 $NUM_CALLS`; do
    echo -n "Testing prog_ls on root of share with socket failure at #${IDX} ..."
    READV_CLOSE=${IDX} LD_PRELOAD=./ld_sockerr.so libtool --mode=execute valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=77 ./prog_ls "${TESTURL}/" >/dev/null 2>valgrind.out
    expr $? "==" "77" >/dev/null && failure
    success
done

exit 0