Dmitry V. Levin
2154702865
As the kernel recognizes F_GETLK64, F_SETLK64, and F_SETLKW64 commands in fcntl64 syscall only, do not parse their structures in fcntl parser. * xlat/fcntlcmds.in: Move F_GETLK64, F_SETLK64, and F_SETLKW64 ... * xlat/fcntl64cmds.in: ... here. * fcntl.c: Include "xlat/fcntl64cmds.h". (print_fcntl): Move printing of first two syscall arguments and handling of F_GETLK64, F_SETLK64, and F_SETLKW64 commands ... (SYS_FUNC(fcntl), SYS_FUNC(fcntl64)): ... here. * tests/fcntl.c: New file, based on struct_flock.c. * tests/fcntl64.c: Likewise. * tests/struct_flock.c (test_flock_einval, create_sample): New functions. (test_flock): Use test_flock_einval. (test_flock64, main): Remove. * tests/fcntl.test: New test. * tests/fcntl64.test: Likewise. * tests/struct_flock.test: Remove. * tests/Makefile.am (check_PROGRAMS): Add fcntl and fcntl64, remove struct_flock. (TESTS): Add fcntl.test and fcntl64.test, remove struct_flock.test. (EXTRA_DIST) Add struct_flock.c. * tests/.gitignore: Add fcntl and fcntl64, remove struct_flock.
15 lines
205 B
Bash
Executable File
15 lines
205 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Check fcntl decoding.
|
|
|
|
. "${srcdir=.}/init.sh"
|
|
|
|
run_prog > /dev/null
|
|
OUT="$LOG.out"
|
|
syscall=${ME_%.test}
|
|
run_strace -a8 -e$syscall $args > "$OUT"
|
|
match_diff "$LOG" "$OUT"
|
|
rm -f "$OUT"
|
|
|
|
exit 0
|