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
[email protected]
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list