[LTP] Test library API changes
Jan Stancek
jstancek@redhat.com
Fri Mar 11 14:57:08 CET 2016
----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp@lists.linux.it
> Sent: Thursday, 10 March, 2016 5:57:21 PM
> Subject: Re: [LTP] Test library API changes
>
> Hi!
> Up to date version is at usuall place:
>
> https://github.com/metan-ucw/ltp
>
>
> Changes are:
>
> * Now we use env variable for SHM path
>
> - I was thinking about setting it to the /proc path if proc is mounted
> but that way we would have to keep the fd open (and it would occupy
> fd=3) and I think that the less resources the library occupy the
> better
>
> * The rest of the default test options -I and -C are now working
>
> * I've given up on SAFE_MACROS in cleaup for now
>
> - We may add them later, but I would like to get this merged ideally
> before we do another release and doing this would take some time
I think we have this problem already. tst_brk() will call tst_vbrk_(),
which calls cleanup_ipc(), which is using SAFE_* macros. It looks like
we'll get infinite loop if any of those fail.
>
> * All relevant parts of test-writing-guidelines should be now rewritten
>
> - There are couple of functions that still take cleanup as fist
> parameter and that are not exported to the new library but that
> should be all that is missing
"Child processes started via exec*, or any other processes must initialize the
checkpoint by calling 'TST_CHECKPOINT_INIT()' before usage."
This doesn't sound correct for newlib. We now have "tst_checkpoint_open()".
---
'To make sure cleanup() was called only once LTP has a helper
"TST_DECLARE_ONCE_FN"'
TST_DECLARE_ONCE_FN is declared in test.h, it doesn't look like newlib
can use it at the moment.
---
I'm not sure it is enough to make cleanup() call only once. It looks like
we still can get into situation where we call "do_cleanup();cleanup_ipc();"
more than once (if we hit tst_brk in multiple threads with newlib)
---
Can we remove "SAFE_CLOSE(ipc_fd);" from cleanup_ipc()? This fd
is already closed in setup_ipc().
---
Should "struct tst_test *tst_test" be initialized to NULL?
Some tst_res.c oldlib functions are using it, but it is initialized only
if you use newlib, at tst_run_tcases().
>
>
> Anything else that should be done before we can merge it?
I only made a compile test on some old/recent RHEL distros
and ran some newlib testcases by hand. This worked OK.
Have you tried running all of the (oldlib) tests on
various arches/releases to see if we haven't regressed?
I could run it against various RHEL majors, it
would take couple days.
Regards,
Jan
>
> --
> Cyril Hrubis
> chrubis@suse.cz
>
More information about the ltp
mailing list