[LTP] [PATCH] Convert chdir01 to the new API

Martin Doucha mdoucha@suse.cz
Fri Jul 24 14:47:44 CEST 2020


On 24. 07. 20 14:36, Petr Vorel wrote:
>>> chdir02.c tests chdir("/"); and chdir("/tmp"). Not sure whether full path is
>>> more coverage than relative path from chdir01.c.
>>> If we consider these useful, we can just add it into chdir01.c.
> 
>>> Although it looks a bit strange to chroot into root, I'd use just that and avoid
>>> /tmp (it breaks at least for Android with no good reason).
> 
>> I guess that we can add /etc or something that is generally present on
>> the system.
> /etc is a symlink to /system/etc (maybe not presented everywhere). /sbin or /bin
> are symlinks on distros which has done usr merge, thus might disappear in the
> future.  I'd vote for /dev, which is everywhere (so far).

Note that we technically also have a test case for absolute path to LTP
working directory (changed to mountpoint in v2) because each test case
starts with SAFE_CHDIR(workdir);.

-- 
Martin Doucha   mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic


More information about the ltp mailing list