public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: alexey.kodanev@oracle.com
Cc: vasily.isaenko@oracle.com, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] New core test of hardlinks and symlinks restrictions added in Linux 3.6. Disabled by default in Linux 3.7.
Date: Mon, 6 May 2013 18:42:53 +0200	[thread overview]
Message-ID: <20130506164253.GA15114@rei.suse.cz> (raw)
In-Reply-To: <5187D15B.7080106@oracle.com>

Hi!
> > Use tabs for indentation. And look for lines over 80 chars. Please use
> > checkpatch.pl from linux kernel sources to check the patch next time.
> I used checkpatch.pl on this code, but considered 80 chars limit as not 
> strict warning, I will fix it.

Okay.

> >> +static void create_test_user(void)
> >> +{
> >> +	char cmd[MAX_CMD_LEN];
> >> +	snprintf(cmd, MAX_CMD_LEN, "%s %s", "useradd", users[TEST_USER].name);
> > You can change the format string to "useradd %s" ;)
> that's right :), at first I thought to use it as a function parameter to 
> pass "useradd" or "userdel -r"

That would work as well.

> >> +	char *cwd = get_tst_tmpdir();
> >> +	cwd_offset = strlen(cwd);
> >> +
> >> +	mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO;
> >> +	chmod(cwd, mode);
> >> +
> >> +	struct dir_params *bdir = bdirs;
> >> +	strcpy(bdir->path, cwd);
> >> +	free(cwd);
> > Do you really need the global path to the tst tmp dir? The call to
> > tst_tmpdir() changes your CWD to it, so at least the subdirs could be
> > created with local paths.
> It's simplify hardlinks and symlinks creation, otherwise I have to 
> construct relative paths that a bit more complicated.
> Also, some test-cases can be added to deal with files which are outside 
> of test tmpdir.

What about using relative paths where they are easier to use? 

> Thank you for your comments!
> 
> Could you please tell me how should I send the corrected patch, just in 
> the same way?

Yes please, the LTP mailing list is right place to post patches for review.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2013-05-06 16:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-06  9:41 [LTP] [PATCH] New core test of hardlinks and symlinks restrictions added in Linux 3.6. Disabled by default in Linux 3.7 Alexey Kodanev
2013-05-06 13:47 ` chrubis
     [not found]   ` <5187D15B.7080106@oracle.com>
2013-05-06 16:42     ` chrubis [this message]
2013-05-06 15:55 ` Mike Frysinger
  -- strict thread matches above, loose matches on Subject: below --
2013-05-07  8:40 Alexey Kodanev
2013-05-07 14:29 ` chrubis
2013-04-30  6:27 Alexey Kodanev
2013-04-30 12:24 ` chrubis
2013-04-30 17:24 ` Mike Frysinger

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=20130506164253.GA15114@rei.suse.cz \
    --to=chrubis@suse.cz \
    --cc=alexey.kodanev@oracle.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=vasily.isaenko@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox