io_pgetevents02: Pass the union member of tst_ts
PATCH 1/1 io_pgetevents02: Pass the union member of tst_ts
Currently we pass the whole tst_ts struct. The kernel expects the union part of this struct.
Signed-off-by Richard Palethorpe <[email protected]>
Cc Viresh Kumar <[email protected]>
---
Note that because bad_addr is (void *) the whole ternary expression becomes (void *). The tc->timeout is then also implicitly cast to void.
testcases/kernel/syscalls/io_pgetevents/io_pgetevents02.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
testcases/kernel/syscalls/io_pgetevents/io_pgetevents02.c +2 -5
@@ -93,11 +93,8 @@ static void run(unsigned int n) {struct time64_variants *tv = &variants[tst_variant];struct tcase *tc = &tcases[n]; -struct timespec *to; -sigset_t *sigmask; - - sigmask = tc->sigmask ? tc->sigmask : bad_addr; - to = tc->timeout ? tc->timeout : bad_addr; +void *const to = tc->timeout ?tst_ts_get (tc->timeout) : bad_addr; +sigset_t *const sigmask = tc->sigmask ? tc->sigmask : bad_addr;TEST (tv->io_pgetevents (*tc->ctx, tc->min_nr, tc->max_nr, tc->events, to, sigmask));
Signature · 5 lines
2.31.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Richard,
Quoted 2 lines
Currently we pass the whole
tst_tsstruct. The kernel expects the union part of this struct.
Thanks!
Reviewed-by Petr Vorel <[email protected]>
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Good catch, pushed, thanks.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp