From: <ch...@su...> - 2013-07-03 10:56:14
|
Hi! > Create new test case for MS_BIND of mount. > > Checking if file is visible from target mountpoint after bind mount. > > +/************************************************************************** > + * > + * EXECUTED BY : root / superuser > + * > + * DESCRIPTION > + * Test for feature MS_BIND of mount. > + * "Perform a bind mount, making a file or a directory subtree visible > + * at another point within a file system." > + * > + * Setup: > + * Setup signal handling. > + * Create a mount point. > + * Pause for SIGUSR1 if option specified. > + * > + * Test: > + * Loop if the proper options are given. > + * Execute system call > + * Check return code, if system call failed (return=-1) > + * Log the errno and Issue a FAIL message. > + * Otherwise, Issue a PASS message. > + * > + * Cleanup: > + * Delete the mount point. > + * > + * RESTRICTIONS > + * test must run with the -D option Now this part of the comment is not relevant anymore. Which is the reason we should comment only information that is not easily seen from the test itself. If some options are required the test must print error when these are not passed. Adding these to comments too only creates room for outdated and misleading informations. I would just keep the description here which nicely tells what the test does in one sentence, the rest of the comment is mostly useless. > + * test doesn't support -c option to run it in parallel, as mount > + * syscall is not supposed to run in parallel. > + *****************************************************************************/ The test code looks fine to me. -- Cyril Hrubis ch...@su... |