From 1eb8418af00655441a443ee2633f090c7144dd9b Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Fri, 14 Aug 2020 10:54:57 +0200 Subject: tests: fix false-positive match on modules The systemd service file ./systemd/system/sysinit.target.wants/systemd-modules-load.service can exist which will lead to a match for "modules", though we are only looking for the modules directory. (cherry picked from commit 7373a5bb938cd06c8d040c4412d6bf1940f5af38) --- test/fs/private-lib.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/fs/private-lib.exp b/test/fs/private-lib.exp index 777424ebe..129fa5b98 100755 --- a/test/fs/private-lib.exp +++ b/test/fs/private-lib.exp @@ -30,8 +30,8 @@ after 100 send -- "cd /lib; find .\r" expect { timeout {puts "TESTING ERROR 5\n";exit} - "modules" {puts "TESTING ERROR 6\n";exit} - "firmware" {puts "TESTING ERROR 7\n";exit} + "/modules" {puts "TESTING ERROR 6\n";exit} + "/firmware" {puts "TESTING ERROR 7\n";exit} "libc.so" } after 100 -- cgit v1.2.3-54-g00ecf From 018a2f589a4b76a7fc31100461fc13aa4ab64d1d Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Fri, 14 Aug 2020 11:12:49 +0200 Subject: tests: fix rlimit test for 32bit archs On 32bit architectures like armhf, the output was "unlimited" instead of the expected value. (cherry picked from commit 45480f36de7a5d0965912039d406534e2b80d4a0) --- test/environment/rlimit-profile.exp | 2 +- test/environment/rlimit.exp | 4 ++-- test/environment/rlimit.profile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/environment/rlimit-profile.exp b/test/environment/rlimit-profile.exp index 43d6a3ee0..33eb0b3fd 100755 --- a/test/environment/rlimit-profile.exp +++ b/test/environment/rlimit-profile.exp @@ -27,7 +27,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1.4\n";exit} - "Max address space 123456789012 123456789012" + "Max address space 1234567890 1234567890" } expect { timeout {puts "TESTING ERROR 1.5\n";exit} diff --git a/test/environment/rlimit.exp b/test/environment/rlimit.exp index 38cdc3eea..c0ba895fe 100755 --- a/test/environment/rlimit.exp +++ b/test/environment/rlimit.exp @@ -5,7 +5,7 @@ cd /home spawn $env(SHELL) match_max 100000 -send -- "firejail --rlimit-fsize=1024 --rlimit-nproc=1000 --rlimit-nofile=500 --rlimit-sigpending=200 --rlimit-as=123456789012\r" +send -- "firejail --rlimit-fsize=1024 --rlimit-nproc=1000 --rlimit-nofile=500 --rlimit-sigpending=200 --rlimit-as=1234567890\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" @@ -27,7 +27,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1.4\n";exit} - "Max address space 123456789012 123456789012" + "Max address space 1234567890 1234567890" } expect { timeout {puts "TESTING ERROR 1.5\n";exit} diff --git a/test/environment/rlimit.profile b/test/environment/rlimit.profile index a569edc6d..2f1134e6c 100644 --- a/test/environment/rlimit.profile +++ b/test/environment/rlimit.profile @@ -2,4 +2,4 @@ rlimit-fsize 1024 rlimit-nproc 1000 rlimit-nofile 500 rlimit-sigpending 200 -rlimit-as 123456789012 +rlimit-as 1234567890 -- cgit v1.2.3-54-g00ecf From 51ba949ab59010d9229bc049bab57c6fc7414b62 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Fri, 14 Aug 2020 11:17:19 +0200 Subject: tests: fix check for modules directory 'modules' can also be seen as a sub-directory, e.g. ./powerpc64le-linux-gnu/gio/modules/libgiolibproxy.so (cherry picked from commit 78e8d3834a6bab67dcfb9fd8998ee81f64c797f9) --- test/fs/private-lib.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/fs/private-lib.exp b/test/fs/private-lib.exp index 129fa5b98..21093e119 100755 --- a/test/fs/private-lib.exp +++ b/test/fs/private-lib.exp @@ -30,8 +30,8 @@ after 100 send -- "cd /lib; find .\r" expect { timeout {puts "TESTING ERROR 5\n";exit} - "/modules" {puts "TESTING ERROR 6\n";exit} - "/firmware" {puts "TESTING ERROR 7\n";exit} + "./modules" {puts "TESTING ERROR 6\n";exit} + "./firmware" {puts "TESTING ERROR 7\n";exit} "libc.so" } after 100 -- cgit v1.2.3-54-g00ecf