tail: Tweak follow_rename test case
Add a brief sleep to give tail time to start following the file before we rename it. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D52887
This commit is contained in:
@@ -341,6 +341,7 @@ follow_create_body()
|
|||||||
rm -f infile
|
rm -f infile
|
||||||
tail -F infile > outfile &
|
tail -F infile > outfile &
|
||||||
pid=$!
|
pid=$!
|
||||||
|
sleep 0.1
|
||||||
seq 1 5 >infile
|
seq 1 5 >infile
|
||||||
sleep 2
|
sleep 2
|
||||||
atf_check cmp infile outfile
|
atf_check cmp infile outfile
|
||||||
@@ -360,6 +361,7 @@ follow_rename_body()
|
|||||||
seq 1 3 > infile
|
seq 1 3 > infile
|
||||||
tail -F infile > outfile &
|
tail -F infile > outfile &
|
||||||
pid=$!
|
pid=$!
|
||||||
|
sleep 0.1
|
||||||
seq 4 5 > infile_new
|
seq 4 5 > infile_new
|
||||||
atf_check mv infile infile_old
|
atf_check mv infile infile_old
|
||||||
atf_check mv infile_new infile
|
atf_check mv infile_new infile
|
||||||
|
|||||||
Reference in New Issue
Block a user