[LTP] [PATCH v3] Add more testcases in mkdir03

Petr Vorel pvorel@suse.cz
Fri Mar 8 00:50:26 CET 2024


> Hi!
> > +#include <paths.h>
> > +#include <stdlib.h>
> >  #include <errno.h>
> >  #include <sys/types.h>
> >  #include <sys/stat.h>
> > @@ -19,6 +21,10 @@
> >  #include "tst_test.h"

> >  #define TST_EEXIST	"tst_eexist"
> > +#define TST_PIPE	"tst_pipe"
> > +#define TST_FOLDER	"tst_folder"
> > +#define TST_SYMLINK "tst_symlink"
> > +#define TST_NULLDEV	_PATH_DEVNULL

> I would just hardcode the "/dev/null" here, this has potential to
> explode on alternative libc implementations, possibly Android.

> Hmm looking around the file seems to exists on Android and Musl however
> _PATH_DEVNULL is just "/dev/null" everywhere anyways.

Yeah, IMHO not that readable as hardcoded value, but it's safe to use nowadays.

Anyway, merged.

Kind regards,
Petr


More information about the ltp mailing list