-
Notifications
You must be signed in to change notification settings - Fork 4.1k
mtr: mem is pure flag / add /run/shm #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Since 716621d, opt_mem is a pure flag. However it is assigned to the value of $MTR_MEM. This leads to conflicts when MTR_MEM=/xxx/yy ./mtr --mem is invoked. Here the --mem option overrided opt_mem leaving the default path to be chosen. This change makes when MTR_MEM set, opt_mem, the flag, is also set. Both the environment and flag can no be set without conflicting. /run/shm is added to the beginning of the path as its now used in a few distros and is conceptually better than /dev for its purpose. Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it. |
I'm afraid it's a bit more complicated than just adding /run/shm to the list of alternatives. On Ubuntu 14.04 they have changed the ramdisk to /run/shm but have kept /dev/shm as a softlink. This was causing some tests to fail because they would compare a path as known by mtr with /dev/shm with one known by the server. But the path reported by the server had been canonicalized to /run/shm and this did not match. With your patch this would not be a problem as it will use /run/shm. However, sometime between Ubuntu 14.04 and 16.04 they switched back to using /dev/shm and now /run/shm is a softlink instead. Since /run/shm exists and is first in your list mtr will use that and now some tests will fail because the server uses /dev/shm. What mtr really needs to do is pick the first path in the list which is not a softlink. So adding /run/shm to the list is good but you'll also need this additional check. |
Hi, thank you for your contribution. Please confirm this code is submitted under the terms of the OCA (Oracle's Contribution Agreement) you have previously signed by cutting and pasting the following text as a comment: |
Hi, thank you for your contribution. Your code has been assigned to an internal queue. Please follow |
From Bjorn Munch it seems symlinks can confuse some tests. Lets just avoid those. (ref: mysql/mysql-server#116 (comment)) Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
From Bjorn Munch it seems symlinks can confuse some tests. Lets just avoid those. (ref: mysql/mysql-server#116 (comment)) Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
From Bjorn Munch it seems symlinks can confuse some tests. Lets just avoid those. (ref: mysql/mysql-server#116 (comment)) Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
…ner (10.0) (#289) * Revert "Make --mem a pure flag. If there is need to specifically set the location" This reverts commit 716621d. * MDEV-11619: mtr: when --mem is pure flag, conflicts with $MTR_MEM Conflicts occurs when MTR_MEM=/xxx/yy ./mtr --mem is invoked. Here the --mem option overrides opt_mem leaving the default path to be chosen. This change makes when MTR_MEM set, opt_mem, the flag, is also set. Both the environment and flag can no be set without conflicting. Signed-off-by: Daniel Black <daniel.black@au.ibm.com> * MDEV-11619: if opt_mem is a path include it first * MDEV-11619: MTR_MEM locations - don't follow symlinks From Bjorn Munch it seems symlinks can confuse some tests. Lets just avoid those. (ref: mysql/mysql-server#116 (comment)) Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
Since 716621d, opt_mem is
a pure flag. However it is assigned to the value of $MTR_MEM.
This leads to conflicts when MTR_MEM=/xxx/yy ./mtr --mem is
invoked. Here the --mem option overrided opt_mem leaving the
default path to be chosen.
This change makes when MTR_MEM set, opt_mem, the flag, is also
set. Both the environment and flag can no be set without conflicting.
/run/shm is added to the beginning of the path as its now used
in a few distros and is conceptually better than /dev for its purpose.