[Fuego] busybox_chmod1 seems to have a bogus test
Wang, Mingyu
wangmy at cn.fujitsu.com
Mon Jul 23 02:50:24 UTC 2018
Hi Tim,
Yes, you are right. This code is not able to check if g+x is executed successfully or not.
I have modified this code to check if there is owner execute permission.
by Wangmy.
-----Original Message-----
From: Tim.Bird at sony.com [mailto:Tim.Bird at sony.com]
Sent: Saturday, July 21, 2018 4:48 AM
To: Wang, Mingyu/王 鸣瑜 <wangmy at cn.fujitsu.com>; fuego at lists.linuxfoundation.org
Subject: busybox_chmod1 seems to have a bogus test
This check, in busybox_chmod1, look suspicious.
> busybox chmod g+x ./test_dir/test1
> if [ "$(busybox ls -l ./test_dir | grep -v "total" | cut -b 1-3)" =
> "-rw" ] then
> echo " -> $test: Changed file permissions verification#2 succeeded."
> else
> echo " -> $test: Changed file permissions verification#2 failed."
> echo " -> $test: TEST-FAIL"
> rm -rf ./test_dir
> exit
> fi;
The operation 'chmod g+x' is performed. Then the test looks at the directory flag, and first two owner permissions (bytes 1-3).
It doesn't even look at the owner execute permissions.
I would have expected the cut to retrieve the group permission bytes, to check that they are 'execute' ('x').
Is this a bug in the test, or am I missing something?
-- Tim
More information about the Fuego
mailing list