path: root/tests/bugs/core/io-stats-1322825.t
diff options
authorAmar Tumballi <>2018-07-24 15:42:28 +0530
committerAmar Tumballi <>2018-09-05 09:24:52 +0000
commit9716ce88b3a1faf135a6badc02d94249898059dd (patch)
tree330945b605643c7c7b371e240cb7719be85a4dd7 /tests/bugs/core/io-stats-1322825.t
parent35f86ce46240c4f9c216bbc29164ce441cfca1e7 (diff)
io-stats: dump io-stats info in /var/run/gluster
It wouldn't make sense to allow iostats file to be written in *any* directory. While the formating makes sure we try to append io-stats-name for the file, so overwriting existing file is slim, but in any case it makes sense to restrict dumping to one directory. Below are the sample commands, and files created for the corresponding values: $ setfattr -n -v file-for-dump $M0 In this case, the file would be in /var/run/gluster/file-for-dump $ setfattr -n -v /dir1/dir2/file-for-dump $M0 In this case, then the dump file is in /var/run/gluster/dir1-dir2-file-for-dump Note that the value passed for this virtual xattr would be treated as a file, and even if the value has '/' in it, it would be changed to '-' for sanity. Fixes: bz#1625106 Change-Id: Id9ae6a40a190b8937c51662e6e1c2a0f6c86a0e0 Signed-off-by: Amar Tumballi <>
Diffstat (limited to 'tests/bugs/core/io-stats-1322825.t')
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/bugs/core/io-stats-1322825.t b/tests/bugs/core/io-stats-1322825.t
index d232ecb2420..53f2d040daa 100755
--- a/tests/bugs/core/io-stats-1322825.t
+++ b/tests/bugs/core/io-stats-1322825.t
@@ -23,7 +23,7 @@ TEST $CLI volume profile $V0 start
TEST mkdir $M0/dir1
# Generate the stat dump across the io-stat instances
-TEST setfattr -n -v /tmp/io-stats-1322825 $M0
+TEST setfattr -n -v io-stats-1322825 $M0
# Check if $M0 is clean w.r.t xattr information
# TODO: if there are better ways to check we really get no attr error, please
@@ -42,12 +42,12 @@ ret=$(echo $?)
EXPECT 0 echo $ret
# Check if we have 5 io-stat files in /tmp
-EXPECT 5 ls -1 /tmp/io-stats-1322825*
+EXPECT 5 ls -1 /var/run/gluster/io-stats-1322825*
# Cleanup the 5 generated files
-rm -f /tmp/io-stats-1322825*
+rm -f /var/run/gluster/io-stats-1322825*
# Rinse and repeat above for a directory
-TEST setfattr -n -v /tmp/io-stats-1322825 $M0/dir1
+TEST setfattr -n -v io-stats-1322825 $M0/dir1
getfattr -n $B0/${V0}1/dir1 2>&1 | grep -qi "no such attribute"
ret=$(echo $?)
EXPECT 0 echo $ret
@@ -61,7 +61,7 @@ getfattr -n $B0/${V0}4/dir1 2>&1 | grep -qi "no such attri
ret=$(echo $?)
EXPECT 0 echo $ret
-EXPECT 5 ls -1 /tmp/io-stats-1322825*
-rm -f /tmp/io-stats-1322825*
+EXPECT 5 ls -1 /var/run/gluster/io-stats-1322825*
+rm -f /var/run/gluster/io-stats-1322825*