summaryrefslogtreecommitdiff
path: root/test/variadic/main.c
Commit message (Collapse)AuthorAgeFilesLines
* Test assumptions about variadic re-packingDaniel Kahn Gillmor2021-03-051-0/+70
This test uses the same style of re-packing variadic arguments through two layers of variadic calls, and compares that call chain against one direct variadic call. The outer function uses the same kind of re-packing used in src/libfaketime.c's syscall (leading to real_syscall), but the inner functions use different assumptions about the types of each argument. This is not an entirely comprehensive test, because we only define two different inner function signatures. If some particular syscall is breaking when intercepted, consider adding something like its expected function signature in test/variadic/inner.c, and invoke it in test/variadic/main.c. Note that we don't test any floating point types (those types are typically passed in registers in x86-64, not on the stack, and are also not used for any syscall that i'm aware of).