# Test that gdb finds the source of a userland program.
# This test is only expected to pass on builds with debug symbols
# that have been installed with source.

from bracket import make_sh_test_op

def op():
    return make_sh_test_op('gdb_source_test',
'''
cat <<EOF >test.gdb
l main
EOF
gdb --batch -x test.gdb /bin/sh >gdb.out 2>gdb.err
! grep "No such file" gdb.err
''')
