Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Feb 1, 2023 Library code

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit c6cade164bc7e35e95ba88f816be4f44475e4e23:

lib/pattern: Fix seg fault when calculating pattern length (2023-01-30 10:46:22 -0500)

are available in the Git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to 7d7a704638a1e957c845c04eeac82bdeda0c674c:

lib/pattern: fix formatting (2023-01-31 10:44:54 -0500)

----------------------------------------------------------------
Vincent Fu (2):
test: add test for lib/pattern segfault issue lib/pattern: fix formatting

 lib/pattern.c             | 4 ++--
 t/jobs/t0028-c6cade16.fio | 5 +++++
 t/run-fio-tests.py        | 9 +++++++++
 3 files changed, 16 insertions(+), 2 deletions(-)
 create mode 100644 t/jobs/t0028-c6cade16.fio

---

Diff of recent changes:

lib/pattern.c +2 -2
index e31d4734..9fca643e 100644
@@ -386,9 +386,9 @@ static int parse_and_fill_pattern(const char *in, unsigned int in_len,
 		assert(filled);
 		assert(filled <= out_len);
 		out_len -= filled;
-		if (out)
-			out     += filled;
 		total   += filled;
+		if (out)
+			out += filled;
 
 	} while (in_len);
 
t/jobs/t0028-c6cade16.fio new file +5 -0
new file mode 100644
index 00000000..a0096d80
@@ -0,0 +1,5 @@
+[test]
+size=16k
+readwrite=write
+buffer_pattern="abcd"-120xdeadface
+ioengine=null
t/run-fio-tests.py +9 -0
index 70ff4371..c3091b68 100755
@@ -1246,6 +1246,15 @@ TEST_LIST = [
         'pre_success':      None,
         'requirements':     [],
     },
+    {
+        'test_id':          28,
+        'test_class':       FioJobTest,
+        'job':              't0028-c6cade16.fio',
+        'success':          SUCCESS_DEFAULT,
+        'pre_job':          None,
+        'pre_success':      None,
+        'requirements':     [],
+    },
     {
         'test_id':          1000,
         'test_class':       FioExeTest,