Skip to content

Commit

Permalink
datetime.rs add flask web server datetime pattern
Browse files Browse the repository at this point in the history
Issue #259
  • Loading branch information
jtmoon79 committed Mar 24, 2024
1 parent a069057 commit 7f700e6
Show file tree
Hide file tree
Showing 7 changed files with 1,162 additions and 1,118 deletions.
11 changes: 10 additions & 1 deletion src/data/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2445,7 +2445,7 @@ pub type DateTimeParseInstrsRegexVec = Vec<DateTimeRegex>;
// XXX: do not forget to update test `test_DATETIME_PARSE_DATAS_test_cases`
// in `datetime_tests.rs`. The `test_matrix` range end value must match
// this value.
pub const DATETIME_PARSE_DATAS_LEN: usize = 127;
pub const DATETIME_PARSE_DATAS_LEN: usize = 128;

/// Built-in [`DateTimeParseInstr`] datetime parsing patterns.
///
Expand Down Expand Up @@ -3426,6 +3426,15 @@ pub const DATETIME_PARSE_DATAS: [DateTimeParseInstr; DATETIME_PARSE_DATAS_LEN] =
],
line!(),
),
DTPD!(
concatcp!(RP_LB, CGP_DAYde, D_Dq, CGP_MONTHb, D_Dq, CGP_YEAR, D_DHcdq, CGP_HOUR, D_T, CGP_MINUTE, D_T, CGP_SECOND, RP_BLANKq, RP_RB),
DTFSS_bdHMSY, 0, 300, CGN_DAY, CGN_SECOND,
&[
// Flask web server default log format
(15, 35, (O_L, 2024, 3, 22, 15, 11, 28, 0), r#"127.0.0.1 - - [22/Mar/2024 15:11:28] "GET / HTTP/1.1" 200 -"#),
],
line!(),
),
// prior patterns with fractionals 1-9
DTPD!(
concatcp!(RP_LB, CGP_DAYde, D_Dq, CGP_MONTHb, D_Dq, CGP_YEAR, D_DHcdq, CGP_HOUR, D_T, CGP_MINUTE, D_T, CGP_SECOND, D_SF, CGP_FRACTIONAL, RP_BLANKq, CGP_TZz, RP_RB),
Expand Down
2 changes: 1 addition & 1 deletion src/tests/datetime_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ fn test_DATETIME_PARSE_DATAS_builtin() {
/// Must manually update the `test_matrix` range end value to the same as
/// `DATETIME_PARSE_DATAS_LEN`.
#[allow(clippy::zero_prefixed_literal)]
#[test_matrix(0..127)]
#[test_matrix(0..128)]
fn test_DATETIME_PARSE_DATAS_test_cases(index: usize) {
stack_offset_set(Some(2));

Expand Down
22 changes: 11 additions & 11 deletions src/tests/syslinereader_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5520,7 +5520,7 @@ fn test_ezcheck_slice(
4,
0,
0,
508,
512,
0,
0,
0,
Expand All @@ -5529,7 +5529,7 @@ fn test_ezcheck_slice(
28,
0,
7,
480,
484,
0,
7;
"NTF_GZ_8BYTE_FPATH"
Expand Down Expand Up @@ -5558,9 +5558,9 @@ fn test_ezcheck_slice(
0,
1,
0,
75,
76,
4,
71,
72,
0,
0,
0,
Expand All @@ -5569,7 +5569,7 @@ fn test_ezcheck_slice(
4,
0,
0,
71,
72,
0;
"NTF_SYSLINE_1_PATH (cache)"
)]
Expand Down Expand Up @@ -5597,9 +5597,9 @@ fn test_ezcheck_slice(
0,
0,
0,
75,
76,
4,
71,
72,
0,
0,
0,
Expand All @@ -5608,7 +5608,7 @@ fn test_ezcheck_slice(
4,
0,
0,
71,
72,
0;
"NTF_SYSLINE_1_PATH (no cache)"
)]
Expand Down Expand Up @@ -5636,18 +5636,18 @@ fn test_ezcheck_slice(
1,
2,
0,
76,
77,
0,
0,
76,
77,
0,
0,
0,
0,
4,
0,
0,
72,
73,
0;
"NTF_SYSLINE_2_PATH"
)]
Expand Down
2,244 changes: 1,139 additions & 1,105 deletions tools/compare-current-and-expected/expected.stderr

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tools/compare-current-and-expected/logs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
./logs/programs/digital-ocean-cloud-init/cloud-init.log
./logs/programs/digital-ocean-cloud-init/cloud-init-output.log
./logs/programs/evtx/Microsoft-Windows-Kernel-PnP%4Configuration.evtx
./logs/programs/flask/server.log
./logs/programs/journal/RHE_91_system.journal
./logs/programs/journal/Ubuntu22-user-1000x3.journal
./logs/programs/pacman/pacman.log
Expand Down
Empty file.
Empty file.

0 comments on commit 7f700e6

Please sign in to comment.