mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
[9.20] fix: test: fix out-of-tree mem_test
Previously changed mem_test (!10320) introduces a test which checks for the value of `__FILE__`, which is different if the build is done out-of-tree or not, even though this is not relevant for the test (only the base filename is). This result in a broken test for out-of-tree builds. Fix this by changing the way the "grep" is done in the test, ignoring the optional path prefix in the filename. Backport of MR !10343 Merge branch 'backport-colin-fix-outoftree-memtest-9.20' into 'bind-9.20' See merge request isc-projects/bind9!10344
This commit is contained in:
@@ -417,9 +417,12 @@ ISC_RUN_TEST_IMPL(isc_mem_recordflag) {
|
||||
|
||||
/*
|
||||
* Find the allocation of ptr and make sure it contains "[...] 2048 file
|
||||
* mem_test.c line [...]"
|
||||
* [...]" (the "grep" is done in 2 phases because the prefix of the path
|
||||
* of mem_test.c will change if test is built out-of-tree)
|
||||
*/
|
||||
p = strstr(buf, "2048 file mem_test.c line");
|
||||
p = strstr(buf, "2048 file ");
|
||||
assert_non_null(p);
|
||||
p = strstr(p, "mem_test.c line");
|
||||
assert_non_null(p);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user