summaryrefslogtreecommitdiff
path: root/unittest
diff options
context:
space:
mode:
authorDaniel Black <daniel@linux.ibm.com>2020-04-12 12:33:44 +1000
committerDaniel Black <daniel@mariadb.org>2021-04-07 14:05:04 +1000
commitc2a63ac526bf4cd269def30a3d55ff29fdba8f86 (patch)
treea4be65a3c6fc88027610e6c5b01e7a9e97cf54ca /unittest
parent46852b3bbb1c31421d7eec9119e73190bb4f253e (diff)
downloadmariadb-git-c2a63ac526bf4cd269def30a3d55ff29fdba8f86.tar.gz
unittest: my_getopt-t errors on -ve ul{l,}bb-10.6-danielblack-MDEV-22219-negative-unsigned
Diffstat (limited to 'unittest')
-rw-r--r--unittest/mysys/my_getopt-t.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/unittest/mysys/my_getopt-t.c b/unittest/mysys/my_getopt-t.c
index 4b50468ac3f..6ffbfb20789 100644
--- a/unittest/mysys/my_getopt-t.c
+++ b/unittest/mysys/my_getopt-t.c
@@ -377,16 +377,11 @@ int main(int argc __attribute__((unused)), char **argv)
ok(res==0 && arg_c==0 && opt_ull==100,
"res:%d, argc:%d, opt_ull:%llu", res, arg_c, opt_ull);
- /*
- negative numbers are wrapped. this is kinda questionable,
- we might want to fix it eventually. but it'd be a change in behavior,
- users might've got used to "-1" meaning "max possible value"
- */
run("--ull=-100", NULL);
- ok(res==0 && arg_c==0 && opt_ull==18446744073709551516ULL,
+ ok(res==9 && arg_c==1 && opt_ull==0ULL,
"res:%d, argc:%d, opt_ull:%llu", res, arg_c, opt_ull);
run("--ul=-100", NULL);
- ok(res==0 && arg_c==0 && opt_ul==4294967295UL,
+ ok(res==9 && arg_c==1 && opt_ul==0UL,
"res:%d, argc:%d, opt_ul:%lu", res, arg_c, opt_ul);
my_end(0);