You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error is because of multiple shell run at the same time.
normal process is
-> create file(cnt=page-types -Nl -b $1 | tee page_$1 | wc -l) -> get value(page=awk -v line=${rand} 'NR == line {print $1}' page_$1) -> remove file(rm -f page_$1)
but the real is
->thread 1 create page_slab -> thread 2 create page_slab -> thread 1 get value -> thread 1 remove page_slab -> thread 2 get value -> awk:fatal:cannot_open_file`page_slab'for_reading(No_such_file_or_directory)
In pfa/inject:
function get_free_page()
{
local rand=0
cnt=page-types -Nl -b $1 | tee page_$1 | wc -l
if [ $cnt -gt 1 ]; then
rand=$(expr $RANDOM % $cnt + 1)
if [ ${rand} -eq 1 ]; then
# skip the title line of output
((rand++))
fi
page=awk -v line=${rand} 'NR == line {print $1}' page_$1
echo 0x${page}
else
echo 0
fi
rm -f page_$1
}
Change the mce-log/tests/test to do test at one time, and the result is OK.
diff test_org test
49c49
< ./inject $conf &
./inject $conf
./test pfa ""
++++++++++++ running pfa test +++++++++++++++++++
mcelog: no process found
+++ start the injection for page-account.conf +++
inject for page type slab at physical address 0x817c87000 [ NO. 0 ]
inject for page type slab at physical address 0x817c87000 [ NO. 1 ]
+++ start the injection for page-hard.conf +++
inject for page type slab at physical address 0x183319000 [ NO. 0 ]
inject for page type slab at physical address 0x183319000 [ NO. 1 ]
+++ start the injection for page-soft-then-hard.conf +++
inject for page type slab at physical address 0x241c53000 [ NO. 0 ]
+++ start the injection for page-soft.conf +++
inject for page type slab at physical address 0x818a35000 [ NO. 0 ]
inject for page type slab at physical address 0x818a35000 [ NO. 1 ]
./test_org pfa ""
++++++++++++ running pfa test +++++++++++++++++++
mcelog: no process found
+++ start the injection for page-account.conf +++
inject for page type slab at physical address 0x1351c0000 [ NO. 0 ]
inject for page type slab at physical address 0x1351c0000 [ NO. 1 ]
+++ start the injection for page-hard.conf +++
+++ start the injection for page-soft-then-hard.conf +++
inject for page type slab at physical address 0x102788000 [ NO. 0 ]
inject for page type slab at physical address 0x102788000 [ NO. 1 ]
awk: fatal: cannot open file page_slab' for reading (No such file or directory) inject for page type slab at physical address 0x000 [ NO. 0 ] ../../input/GENPAGE: line 15: printf: 0x: invalid hex number ../../input/GENPAGE: line 23: printf: 0x: invalid hex number +++ start the injection for page-soft.conf +++ root@lkp-skl-d05 /lkp/benchmarks/mce-log/tests# awk: fatal: cannot open file page_buddy' for reading (No such file or directory)
inject for page type slab at physical address 0x1a0ee6000 [ NO. 0 ]
inject for page type slab at physical address 0x1a0ee6000 [ NO. 1 ]
The text was updated successfully, but these errors were encountered:
The error is because of multiple shell run at the same time.
normal process is
-> create file(cnt=
page-types -Nl -b $1 | tee page_$1 | wc -l
) -> get value(page=awk -v line=${rand} 'NR == line {print $1}' page_$1
) -> remove file(rm -f page_$1)but the real is
->thread 1 create page_slab -> thread 2 create page_slab -> thread 1 get value -> thread 1 remove page_slab -> thread 2 get value -> awk:fatal:cannot_open_file`page_slab'for_reading(No_such_file_or_directory)
In pfa/inject:
function get_free_page()
{
local rand=0
cnt=
page-types -Nl -b $1 | tee page_$1 | wc -l
if [ $cnt -gt 1 ]; then
rand=$(expr $RANDOM % $cnt + 1)
if [ ${rand} -eq 1 ]; then
# skip the title line of output
((rand++))
fi
page=
awk -v line=${rand} 'NR == line {print $1}' page_$1
echo 0x${page}
else
echo 0
fi
rm -f page_$1
}
Change the mce-log/tests/test to do test at one time, and the result is OK.
diff test_org test
49c49
< ./inject $conf &
./test pfa ""
++++++++++++ running pfa test +++++++++++++++++++
mcelog: no process found
+++ start the injection for page-account.conf +++
inject for page type slab at physical address 0x817c87000 [ NO. 0 ]
inject for page type slab at physical address 0x817c87000 [ NO. 1 ]
+++ start the injection for page-hard.conf +++
inject for page type slab at physical address 0x183319000 [ NO. 0 ]
inject for page type slab at physical address 0x183319000 [ NO. 1 ]
+++ start the injection for page-soft-then-hard.conf +++
inject for page type slab at physical address 0x241c53000 [ NO. 0 ]
+++ start the injection for page-soft.conf +++
inject for page type slab at physical address 0x818a35000 [ NO. 0 ]
inject for page type slab at physical address 0x818a35000 [ NO. 1 ]
./test_org pfa ""
++++++++++++ running pfa test +++++++++++++++++++
mcelog: no process found
+++ start the injection for page-account.conf +++
inject for page type slab at physical address 0x1351c0000 [ NO. 0 ]
inject for page type slab at physical address 0x1351c0000 [ NO. 1 ]
+++ start the injection for page-hard.conf +++
+++ start the injection for page-soft-then-hard.conf +++
inject for page type slab at physical address 0x102788000 [ NO. 0 ]
inject for page type slab at physical address 0x102788000 [ NO. 1 ]
awk: fatal: cannot open file
page_slab' for reading (No such file or directory) inject for page type slab at physical address 0x000 [ NO. 0 ] ../../input/GENPAGE: line 15: printf: 0x: invalid hex number ../../input/GENPAGE: line 23: printf: 0x: invalid hex number +++ start the injection for page-soft.conf +++ root@lkp-skl-d05 /lkp/benchmarks/mce-log/tests# awk: fatal: cannot open file
page_buddy' for reading (No such file or directory)inject for page type slab at physical address 0x1a0ee6000 [ NO. 0 ]
inject for page type slab at physical address 0x1a0ee6000 [ NO. 1 ]
The text was updated successfully, but these errors were encountered: