Skip to contentSkip to conversation

mount/mount05.c: new case to test MS_BIND of mount

PATCH [email protected] 1 participant 1 message Jul 3, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi!

Quoted 17 lines

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.
Quoted 13 lines

+ *
+ * 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.

Quoted 3 lines

+ * 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.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list