From: Anoop C S Date: Wed, 27 Mar 2024 05:15:08 +0000 (+0530) Subject: s4/torture: Fix misplaced positional arguments for u64 comparison X-Git-Tag: tdb-1.4.11~1356 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0a8d832683afddfb6eb69e3bace19ec7aa2911c;p=thirdparty%2Fsamba.git s4/torture: Fix misplaced positional arguments for u64 comparison torture_assert_u64_equal_goto() can only print meaningful error message for incorrect values if only if the function is invoked with test run value and expected value respectively as second and thrid arguments. Otherwise it displays the reversed message causing confusion in overall test results. Signed-off-by: Anoop C S Reviewed-by: Guenther Deschner Autobuild-User(master): Günther Deschner Autobuild-Date(master): Wed Mar 27 13:00:29 UTC 2024 on atb-devel-224 --- diff --git a/source4/torture/smb2/timestamps.c b/source4/torture/smb2/timestamps.c index 3d6d3d1a2fd..a9416481c61 100644 --- a/source4/torture/smb2/timestamps.c +++ b/source4/torture/smb2/timestamps.c @@ -163,18 +163,18 @@ static bool test_time_t(struct torture_context *tctx, nt_time_string(tctx, gi.basic_info.out.change_time)); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.create_time, + nttime, ret, done, "Wrong create time\n"); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.write_time, + nttime, ret, done, "Wrong write time\n"); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.change_time, + nttime, ret, done, "Wrong change time\n"); @@ -190,18 +190,18 @@ static bool test_time_t(struct torture_context *tctx, "smb2_find_level failed\n"); torture_assert_u64_equal_goto(tctx, - nttime, d[0].id_both_directory_info.create_time, + nttime, ret, done, "Wrong create time\n"); torture_assert_u64_equal_goto(tctx, - nttime, d[0].id_both_directory_info.write_time, + nttime, ret, done, "Wrong write time\n"); torture_assert_u64_equal_goto(tctx, - nttime, d[0].id_both_directory_info.change_time, + nttime, ret, done, "Wrong change time\n"); @@ -239,18 +239,18 @@ static bool test_time_t(struct torture_context *tctx, nt_time_string(tctx, gi.basic_info.out.change_time)); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.create_time, + nttime, ret, done, "Wrong create time\n"); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.write_time, + nttime, ret, done, "Wrong write time\n"); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.change_time, + nttime, ret, done, "Wrong change time\n"); @@ -267,18 +267,18 @@ static bool test_time_t(struct torture_context *tctx, "smb2_find_level failed\n"); torture_assert_u64_equal_goto(tctx, - nttime, d[0].id_both_directory_info.create_time, + nttime, ret, done, "Wrong create time\n"); torture_assert_u64_equal_goto(tctx, - nttime, d[0].id_both_directory_info.write_time, + nttime, ret, done, "Wrong write time\n"); torture_assert_u64_equal_goto(tctx, - nttime, d[0].id_both_directory_info.change_time, + nttime, ret, done, "Wrong change time\n"); @@ -423,18 +423,18 @@ static bool test_freeze_thaw(struct torture_context *tctx, nt_time_string(tctx, gi.basic_info.out.change_time)); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.create_time, + nttime, ret, done, "Wrong create time\n"); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.write_time, + nttime, ret, done, "Wrong write time\n"); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.change_time, + nttime, ret, done, "Wrong change time\n"); @@ -477,18 +477,18 @@ static bool test_freeze_thaw(struct torture_context *tctx, nt_time_string(tctx, gi.basic_info.out.change_time)); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.create_time, + nttime, ret, done, "Wrong create time\n"); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.write_time, + nttime, ret, done, "Wrong write time\n"); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.change_time, + nttime, ret, done, "Wrong change time\n"); @@ -531,18 +531,18 @@ static bool test_freeze_thaw(struct torture_context *tctx, nt_time_string(tctx, gi.basic_info.out.change_time)); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.create_time, + nttime, ret, done, "Wrong create time\n"); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.write_time, + nttime, ret, done, "Wrong write time\n"); torture_assert_u64_equal_goto(tctx, - nttime, gi.basic_info.out.change_time, + nttime, ret, done, "Wrong change time\n");