From: chrubis@suse.cz
To: Matus Marhefka <mmarhefk@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH 2/3 v3] containers: added mountns dir and mountns/mountns01.c
Date: Tue, 9 Sep 2014 15:28:33 +0200 [thread overview]
Message-ID: <20140909132833.GA5193@rei> (raw)
In-Reply-To: <1409315004-11702-1-git-send-email-mmarhefk@redhat.com>
Hi!
> +#define _GNU_SOURCE
> +#include <sys/wait.h>
> +#include <sys/mount.h>
> +#include <stdio.h>
> +#include <errno.h>
> +#include "test.h"
> +#include "usctest.h"
> +#include "libclone.h"
> +#include "safe_macros.h"
> +#include "safe_file_ops.h"
> +#include "mountns_helper.h"
> +
> +
> +#define DIRA "A"
> +#define DIRB "B"
> +char *TCID = "mountns01";
> +int TST_TOTAL = 1;
> +
> +
> +/* checks if following mountflags are defined */
This comment is close to "commenting the obvious" category. Everybody
can tell what the preprocessor #if below do. I would personaly omit this
comment.
> +#if defined(MS_SHARED) && defined(MS_PRIVATE) && defined(MS_REC)
> +
> +static void cleanup(void)
> +{
> + umount(DIRA);
> + umount(DIRA);
> + umount(DIRB);
> + tst_rmdir();
> +}
> +
> +static void setup(void)
> +{
> + tst_require_root(NULL);
> + check_newns(); /* from mountns_helper.h */
Here as well. It's not a good idea to comment where functions are
implemented, it only makes the source code longer and less clear.
The rest of the test looks good to me.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2014-09-09 13:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-15 10:52 [LTP] [PATCH 1/3] lib: Add SAFE_MOUNT() Matus Marhefka
2014-08-15 10:52 ` [LTP] [PATCH 2/3] containers: added mountns dir and mountns/mountns01.c Matus Marhefka
2014-08-25 10:26 ` Jan Stancek
2014-09-09 13:39 ` chrubis
2014-08-25 14:08 ` [LTP] [PATCH 2/3 v2] " Matus Marhefka
2014-08-29 12:23 ` [LTP] [PATCH 2/3 v3] " Matus Marhefka
2014-09-09 13:28 ` chrubis [this message]
2014-10-02 12:26 ` [LTP] [PATCH 2/3 v4] " Matus Marhefka
2014-08-15 10:52 ` [LTP] [PATCH 3/3] containers: added mountns/mountns02.c Matus Marhefka
2014-08-15 15:16 ` [LTP] [PATCH 3/3 v2] " Matus Marhefka
2014-08-25 10:33 ` Jan Stancek
2014-08-25 14:09 ` [LTP] [PATCH 3/3 v3] " Matus Marhefka
2014-08-29 12:24 ` [LTP] [PATCH 3/3 v4] " Matus Marhefka
2014-08-29 12:45 ` Jan Stancek
2014-09-09 13:40 ` chrubis
2014-10-02 12:27 ` [LTP] [PATCH 3/3 v5] " Matus Marhefka
2014-10-02 13:35 ` Cyril Hrubis
2014-08-25 10:11 ` [LTP] [PATCH 1/3] lib: Add SAFE_MOUNT() Jan Stancek
2014-08-25 14:06 ` [LTP] [PATCH 1/3 v2] " Matus Marhefka
2014-08-29 12:22 ` [LTP] [PATCH 1/3 v3] lib: Added SAFE_MOUNT() and SAFE_UMOUNT() Matus Marhefka
2014-10-02 12:55 ` Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140909132833.GA5193@rei \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=mmarhefk@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.