Re: [LTP] [PATCH] syscalls/cma: add runtime check to setup()

chrubis
2013-04-23T10:28:42Z

Hi!
> static void setup(void)
> @@ -191,9 +191,11 @@ static void setup(void)
> sflag ? SAFE_STRTOL(NULL, sz_opt, 1, LONG_MAX - PADDING_SIZE * 2)
> : 100000;
>
> -#if !defined(__NR_process_vm_readv)
> +#if !defined(__NR_process_vm_writev)
> tst_brkm(TCONF, NULL, "process_vm_writev does not exist "
> "on your system");
> +#else
> + ltp_syscall(__NR_process_vm_writev, 0, NULL, 0, NULL, 0, 0);
> #endif
> semid = init_sem(1);

If you add the __NR_process_vm_writev to at least one of the
testscases/kernel/include/*.in and run regen script (make clean && make
in the corresponding dir), the linux_syscall_numbers.h will contain at
least stubs and ltp_syscall() will be able to handle both situations.

--
Cyril Hrubis
chrubis@suse.cz