support: Enhance support/tst-support_descriptors compatibility
Checks
Context |
Check |
Description |
redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Test passed
|
Commit Message
Some container environments have different devices for /dev and
/dev/null, leading to extra error output on the second line:
error: descriptor 3 changed from "/dev/null" to "/dev"
error: descriptor 3 changed device from 0:5 to 0:49
error: descriptor 3 changed ino from 4 to 1
The expected error matcher did not capture this before.
Technically, the inode number can remain unchanged due to the
changed device ID, so simply drop that check.
---
support/tst-support_descriptors.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
base-commit: ed416ee402dd0d014ed55b76c3b50c4700d875e3
@@ -130,9 +130,8 @@ test_run (void)
expected = xasprintf ("\nDifferences:\n"
"error: descriptor %d changed from \"/dev/null\""
- " to \"/dev\"\n"
- "error: descriptor %d changed ino ",
- free_descriptor, free_descriptor);
+ " to \"/dev\"\n",
+ free_descriptor);
good = good && !support_record_failure_is_failed ();
proc = support_capture_subprocess (&subprocess_changed_descriptor, NULL);
good = good && support_record_failure_is_failed ();