Bug 5272 - slang test case strops.sl failed in x86-64
Summary: slang test case strops.sl failed in x86-64
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium major
Target Milestone: 1.5
Assignee: Irina Patru
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-09-26 05:35 UTC by LiRongQing
Modified: 2013-10-01 06:46 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LiRongQing 2013-09-26 05:35:12 UTC
1. compile the slang test case by adding compile append in bb file

do_compile_append() {
cd src; make all; pwd; cd test; make sltest
}

2. put the sltest, strops.sl, and inc.sl from src/test to target


3. run test case, it failed.
./sltest strops.sl

4. simplify the test case as below:
4.1 the test script as below
root@qemu0:~# cat my1.sl 
printf("%s", sprintf("%c", ','));
4.2 if it work well, it should be print out ",", but it failed to print
root@qemu0:~# ./sltest my1.sl
root@qemu0:~# ,

5. I think it is toolchain bug, since I only need to add a print in source code,
this bug will disappear,
diff --git a/src/slstrops.c b/src/slstrops.c
index af915a5..15b12f9 100644
--- a/src/slstrops.c
+++ b/src/slstrops.c
@@ -2083,6 +2083,7 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/
                  else if (NULL == SLutf8_encode_null_terminate (wc, utf8_buf))
                    return out;
                  ch = 's';
+                 printf("%s", utf8_buf);
                  str = (char *)utf8_buf;
                  use_string = 1;
               }