From 60e8974e215801f6c29de9f4b786f45323e9af89 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 3 Dec 2020 14:48:16 -0800 Subject: chmod: support complex modes. Change 5109da9b3e6a898c8e0ad647303a1b375e3d97d3 caused test.test to call chmod with mode `u+s+s` which passes on the host (where you have a toybox test but a GNU chmod) but fails on Android where chmod is toybox too. Add the missing loop to string_to_mode(), which means this will also affect other toys, but that seems like a feature (and, for example, GNU mkdir also accepts a mode like `a=r+w+x`). --- tests/chmod.test | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/chmod.test b/tests/chmod.test index 9dcf796e..2c8c6b91 100755 --- a/tests/chmod.test +++ b/tests/chmod.test @@ -112,6 +112,7 @@ chtest u+s "drwsr-xr-x\n-rwSr--r--\n" chtest +s "drwsr-sr-x\n-rwSr-Sr--\n" chtest o+s "drwxr-xr-x\n-rw-r--r--\n" chtest +t "drwxr-xr-t\n-rw-r--r-T\n" +chtest a=r+w+x "drwxrwxrwx\n-rwxrwxrwx\n" mkdir foo ln -s bar foo/baz -- cgit v1.2.3