From 85fba945981a00e6a5e5c95dff31940887456627 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 27 Jun 2023 19:51:49 -0400 Subject: tests/mode: Add more test cases permcopy is broken. --- diff --git a/tests/mode.c b/tests/mode.c index 3944263..924c332 100644 --- a/tests/mode.c +++ b/tests/mode.c @@ -43,8 +43,16 @@ _test(mode_t cur_mode, const char *mode_str, int exp_ret, mode_t exp_mode) int main() { - puts("1..1"); - _test(0000644, "a+x", OPKG_OPK_OK, 0000755); + umask(0022); + puts("1..8"); + _test(0000644, "a+x" , OPKG_OPK_OK, 0000755); + _test(0000755, "go-x" , OPKG_OPK_OK, 0000744); + _test(0000744, "a=rw", OPKG_OPK_OK, 0000666); + _test(0000644, "a+" , OPKG_OPK_OK, 0000644); + _test(0000644, "g=u" , OPKG_OPK_OK, 0000664); + _test(0000644, "u=o" , OPKG_OPK_OK, 0000444); + _test(0000664, "o+g" , OPKG_OPK_OK, 0000666); + _test(0000644, "+wx", OPKG_OPK_OK, 0000755); /* Affected by umask. */ return EXIT_SUCCESS; } -- cgit v0.9.1