[LTP] [PATCH] syscalls/mkdir09: rewrite in new LTP API
Cyril Hrubis
chrubis@suse.cz
Fri Feb 4 13:39:48 CET 2022
Hi!
> > +static void test2(int child_num)
> > +{
> > + /*
> > + * Child routine which attempts to remove directories from the
> > + * test directory which do not exist.
> > + */
> > +
> > + int j;
> > + char tmpdir[MAXPATHLEN];
> > +
> > + while (!done) {
> > + for (j = 1; j < nfiles; j += NCHILD) {
> > + sprintf(tmpdir, DIR_NAME, j);
> > + TEST(rmdir(tmpdir));
> > +
> > + if (TST_RET == 0) {
> > + tst_res(TFAIL, "[%d] rmdir %s succeeded unexpectedly",
> > + child_num, tmpdir);
> > + return;
> > + }
> > +
> > + if (TST_ERR != ENOENT) {
> > + tst_res(TFAIL|TERRNO, "[%d] rmdir %s",
> > + child_num, tmpdir);
> > + return;
> > + }
> > + }
> > + }
> > + tst_res(TPASS, "[%d] create dirs that dont exist", child_num);
^
remove dirs
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list