-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sometimes timestamps are duplicated... to be investigated...
- Loading branch information
Christian Ferrari
committed
Jun 6, 2016
1 parent
0deb65a
commit c2cf5ce
Showing
10 changed files
with
141 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
AT_BANNER([Timestamp resources use case checks]) | ||
|
||
# unique timestamp, hundredth of a second | ||
AT_SETUP([Use case 19 (6/6)]) | ||
AT_DATA([expout], | ||
[[5 | ||
]]) | ||
AT_CHECK([pkill flom], [ignore], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 1 0 "-i 1000 -r _t_tmstmp%S#ff[3]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 1 0 "-i 1000 -r _t_tmstmp%S#ff[3]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 1 0 "-i 1000 -r _t_tmstmp%S#ff[3]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 1 0 "-i 1000 -r _t_tmstmp%S#ff[3]" >>stdout &], [0], [ignore], [ignore]) | ||
# we must be sure, this flom command will be executed as the last one! | ||
AT_CHECK([sleep 1], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 1 0 "-i 1000 -r _t_tmstmp%S#ff[3]" >>stdout], [0], [ignore], [ignore]) | ||
AT_CHECK([cat stdout | grep '^tmstmp' | sort -u | wc -l], [0], [expout], [ignore]) | ||
AT_CLEANUP | ||
|
||
# Generate a basic timestamp: 1, 2, 3! | ||
AT_SETUP([Use case 19 (1/6)]) | ||
AT_DATA([expout], | ||
[[ 1 locking for 0 seconds | ||
1 ending | ||
2 locking for 0 seconds | ||
2 ending | ||
3 locking for 0 seconds | ||
3 ending | ||
]]) | ||
AT_CHECK([pkill flom], [ignore], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec4.sh 1 0 0 "-i 1000 -r _t_tmstmp%S#f[1]" >>stdout], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec4.sh 2 0 0 "-i 1000 -r _t_tmstmp%S#f[1]" >>stdout], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec4.sh 3 0 0 "-i 1000 -r _t_tmstmp%S#f[1]" >>stdout], [0], [ignore], [ignore]) | ||
AT_CHECK([cat stdout | grep -v '^tmstmp'], [0], [expout], [ignore]) | ||
AT_CLEANUP | ||
|
||
# Lock on a timestamp | ||
AT_SETUP([Use case 19 (2/6)]) | ||
AT_DATA([expout], | ||
[[ 1 locking for 2 seconds | ||
2 locking for 2 seconds | ||
3 locking for 1 seconds | ||
1 ending | ||
4 locking for 0 seconds | ||
2 ending | ||
3 ending | ||
4 ending | ||
]]) | ||
AT_CHECK([pkill flom], [ignore], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec4.sh 1 0 2 "-i 1000 -r _t_tmstmp%S[[1]]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec4.sh 2 1 2 "-i 1000 -r _t_tmstmp%S[[1]]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec4.sh 3 2 1 "-i 1000 -r _t_tmstmp%S[[1]]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec4.sh 4 3 0 "-i 1000 -r _t_tmstmp%S[[1]]" >>stdout], [0], [ignore], [ignore]) | ||
AT_CHECK([cat stdout | grep -v '^tmstmp'], [0], [expout], [ignore]) | ||
AT_CLEANUP | ||
|
||
# Multiple timestamp | ||
AT_SETUP([Use case 19 (3/6)]) | ||
AT_DATA([expout], | ||
[[ 1 locking for 6 seconds | ||
2 locking for 3 seconds | ||
3 locking for 5 seconds | ||
4 locking for 1 seconds | ||
2 ending | ||
4 ending | ||
1 ending | ||
3 ending | ||
5 locking for 0 seconds | ||
5 ending | ||
]]) | ||
AT_CHECK([pkill flom], [ignore], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 6 0 "-r _t_tmstmp%S#ff[3]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 2 1 3 1 "-r _t_tmstmp%S#ff[3]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 3 2 5 0 "-r _t_tmstmp%S#ff[3]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 4 3 1 0 "-r _t_tmstmp%S#ff[3]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 5 8 0 0 "-r _t_tmstmp%S#ff[3]" >>stdout], [0], [ignore], [ignore]) | ||
AT_CHECK([cat stdout | grep -v '^tmstmp'], [0], [expout], [ignore]) | ||
AT_CLEANUP | ||
|
||
# unique timestamp, second | ||
AT_SETUP([Use case 19 (4/6)]) | ||
AT_DATA([expout], | ||
[[3 | ||
]]) | ||
AT_CHECK([pkill flom], [ignore], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 1 0 "-i 1000 -r _t_tmstmp%S[[3]]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 1 0 "-i 1000 -r _t_tmstmp%S[[3]]" >>stdout &], [0], [ignore], [ignore]) | ||
# we must be sure, this flom command will be executed as the last one! | ||
AT_CHECK([sleep 1], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 1 0 "-i 1000 -r _t_tmstmp%S[[3]]" >>stdout], [0], [ignore], [ignore]) | ||
AT_CHECK([cat stdout | grep '^tmstmp' | sort -u | wc -l], [0], [expout], [ignore]) | ||
AT_CLEANUP | ||
|
||
# unique timestamp, tenth of a second | ||
AT_SETUP([Use case 19 (5/6)]) | ||
AT_DATA([expout], | ||
[[5 | ||
]]) | ||
AT_CHECK([pkill flom], [ignore], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 1 0 "-i 1000 -r _t_tmstmp%S#f[3]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 1 0 "-i 1000 -r _t_tmstmp%S#f[3]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 1 0 "-i 1000 -r _t_tmstmp%S#f[3]" >>stdout &], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 1 0 "-i 1000 -r _t_tmstmp%S#f[3]" >>stdout &], [0], [ignore], [ignore]) | ||
# we must be sure, this flom command will be executed as the last one! | ||
AT_CHECK([sleep 1], [0], [ignore], [ignore]) | ||
AT_CHECK([flom_test_exec5.sh 1 0 1 0 "-i 1000 -r _t_tmstmp%S#f[3]" >>stdout], [0], [ignore], [ignore]) | ||
AT_CHECK([cat stdout | grep '^tmstmp' | sort -u | wc -l], [0], [expout], [ignore]) | ||
AT_CLEANUP | ||
|