[LTP] [PATCH v4 0/4] mmapstress01: refactor to ltp framework

Cyril Hrubis chrubis@suse.cz
Mon Oct 10 19:49:12 CEST 2022


Hi!
Looks mostly done now, but there are still a few things to fix, some of
them purely cosmetic:

* The finished global has to be volatile otherwise it may get
  miscompiled and it has to be reset at the start for the run()
  otherwise the -i option is broken

* The sighandler setup can be moved to the test setup()

* Now we do not use the pidarray to kill the child processes so it
  became mostly useless, I would consider getting rid of that too

* I'm failing to see why we need to block SIGALRM just before alarm(0)
  as far as I can tell it's completely useless. Also blocking signals
  while we refork looks questionable.

* I would consider getting rid of obvious comments, quite a few of them
  are commenting the obvious

  The ifdefs in setup() does not look nice, maybe we should do something as:

#if _FILE_OFFSET_BITS == 64
# define FSIZE_MIN LONG_MIN
# define FSIZE_MAX LONG_MAX
#else
# define FSIZE_MIN INT_MIN
# define FSIZE_MAX INT_MAX
#endif

 And use the FSIZE_MIN and FSIZE_MAX to avoid ifdefs in the test setup()

* The top level comment should be converted to docparse comment so that
  it's picked up by the documentation parser, that means that the
  comment should start with:

  /*\
   * [Description]
   *

   And should be formatted in asciidoc

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list