diff --git a/compiler-rt/test/dfsan/custom.cpp b/compiler-rt/test/dfsan/custom.cpp --- a/compiler-rt/test/dfsan/custom.cpp +++ b/compiler-rt/test/dfsan/custom.cpp @@ -208,13 +208,13 @@ ASSERT_LABEL(rv, dfsan_union(i_label, j_label)); #endif - char s1[] = "ABCz"; - char s2[] = "abcY"; - dfsan_set_label(i_label, &s1[3], 1); - dfsan_set_label(j_label, &s2[3], 1); + char s1[] = "AbZ"; + char s2[] = "aBy"; + dfsan_set_label(i_label, &s1[2], 1); + dfsan_set_label(j_label, &s2[2], 1); rv = strcasecmp(s1, s2); - assert(rv > 0); // 'z' > 'Y' + assert(rv > 0); // 'Z' > 'y' #ifdef STRICT_DATA_DEPENDENCIES ASSERT_ZERO_LABEL(rv); #else @@ -239,17 +239,17 @@ assert(rv == 0); ASSERT_ZERO_LABEL(rv); - char s1[] = "ABCz"; - char s2[] = "abcY"; - dfsan_set_label(i_label, &s1[3], 1); - dfsan_set_label(j_label, &s2[3], 1); + char s1[] = "AbZ"; + char s2[] = "aBy"; + dfsan_set_label(i_label, &s1[2], 1); + dfsan_set_label(j_label, &s2[2], 1); rv = strncasecmp(s1, s2, 0); assert(rv == 0); // Compare zero chars. ASSERT_ZERO_LABEL(rv); rv = strncasecmp(s1, s2, 1); - assert(rv == 0); // 'a' == 'A' + assert(rv == 0); // 'A' == 'a' ASSERT_ZERO_LABEL(rv); rv = strncasecmp(s1, s2, 2); @@ -257,11 +257,7 @@ ASSERT_ZERO_LABEL(rv); rv = strncasecmp(s1, s2, 3); - assert(rv == 0); // 'c' == 'C' - ASSERT_ZERO_LABEL(rv); - - rv = strncasecmp(s1, s2, 4); - assert(rv > 0); // 'z' > 'Y' + assert(rv > 0); // 'Z' > 'y' #ifdef STRICT_DATA_DEPENDENCIES ASSERT_ZERO_LABEL(rv); #else