<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style="--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>

<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style="font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";">
<div class="content">

<p style="color: #777777;">
<a href="https://gitlab.rtems.org/D3athSkulll">SHIVAM DEOLANKAR</a>
commented on a
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1212#note_148825">discussion</a>:
</p>
<div class="md" style="position: relative; z-index: 1; color: #3a383f; word-wrap: break-word;">
<div class="gl-relative markdown-code-block js-markdown-code" style="margin-top: 0;">
<pre data-canonical-lang="ini" class="code highlight js-syntax-highlight language-ini" v-pre="true" style="display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;"><code style="font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; background-color: inherit; border-radius: .25rem; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;"><span id="LC1" class="line" lang="ini" style="margin-top: 0;"><span class="nn" style="margin-top: 0;">[DEFAULT]</span></span>
<span id="LC2" class="line" lang="ini"><span class="py" style="margin-top: 0;">RTEMS_POSIX_API</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="s">True</span></span>
<span id="LC3" class="line" lang="ini"><span class="py" style="margin-top: 0;">BUILD_TESTS</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="s">True</span></span>
<span id="LC4" class="line" lang="ini"><span class="nn" style="margin-top: 0;">[aarch64/zynqmp_apu]</span></span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">This was the config.ini used.</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">The build was successful with waf.</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">I tried using a testcode for the test and tried fetching result on qemu but it failed starting uart service.</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">The logic solves the issue so analytically this is a viable fix.</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">This was the qemu configuration command used.</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre class="code highlight js-syntax-highlight language-plaintext" v-pre="true" style="display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;"><code style="font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; background-color: inherit; border-radius: .25rem; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;"><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;">qemu-system-aarch64 -no-reboot -nographic -serial mon:stdio  -machine xlnx-zcu102 </span>
<span id="LC2" class="line" lang="plaintext">-m 4096 -kernel /home/shivam/quick-start/src/rtems/build/aarch64/zynqmp_apu/testsuites/samples/hello.exe</span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">This was the test configuration used.</p>
<div class="gl-relative markdown-code-block js-markdown-code" style="margin-bottom: 0;">
<pre class="code highlight js-syntax-highlight language-plaintext" v-pre="true" style="display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;"><code style="font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; background-color: inherit; border-radius: .25rem; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;"><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;">/* SPDX-License-Identifier: BSD-2-Clause */</span>
<span id="LC2" class="line" lang="plaintext"></span>
<span id="LC3" class="line" lang="plaintext">#ifdef HAVE_CONFIG_H</span>
<span id="LC4" class="line" lang="plaintext">#include "config.h"</span>
<span id="LC5" class="line" lang="plaintext">#endif</span>
<span id="LC6" class="line" lang="plaintext"></span>
<span id="LC7" class="line" lang="plaintext">#include <rtems.h></span>
<span id="LC8" class="line" lang="plaintext">#include <tmacros.h></span>
<span id="LC9" class="line" lang="plaintext">#include <fcntl.h></span>
<span id="LC10" class="line" lang="plaintext">#include <unistd.h></span>
<span id="LC11" class="line" lang="plaintext">#include <termios.h></span>
<span id="LC12" class="line" lang="plaintext">#include <dirent.h></span>
<span id="LC13" class="line" lang="plaintext">#include <stdio.h></span>
<span id="LC14" class="line" lang="plaintext"></span>
<span id="LC15" class="line" lang="plaintext">const char rtems_test_name[] = "UART PARITY TEST";</span>
<span id="LC16" class="line" lang="plaintext"></span>
<span id="LC17" class="line" lang="plaintext">static rtems_task Init(rtems_task_argument ignored)</span>
<span id="LC18" class="line" lang="plaintext">{</span>
<span id="LC19" class="line" lang="plaintext">  (void) ignored;</span>
<span id="LC20" class="line" lang="plaintext"></span>
<span id="LC21" class="line" lang="plaintext">  TEST_BEGIN();</span>
<span id="LC22" class="line" lang="plaintext"></span>
<span id="LC23" class="line" lang="plaintext">  /* List devices */</span>
<span id="LC24" class="line" lang="plaintext">  printf("Devices:\n");</span>
<span id="LC25" class="line" lang="plaintext">  DIR *d = opendir("/dev");</span>
<span id="LC26" class="line" lang="plaintext">  struct dirent *dir;</span>
<span id="LC27" class="line" lang="plaintext"></span>
<span id="LC28" class="line" lang="plaintext">  if (d) {</span>
<span id="LC29" class="line" lang="plaintext">    while ((dir = readdir(d)) != NULL) {</span>
<span id="LC30" class="line" lang="plaintext">      printf("%s\n", dir->d_name);</span>
<span id="LC31" class="line" lang="plaintext">    }</span>
<span id="LC32" class="line" lang="plaintext">    closedir(d);</span>
<span id="LC33" class="line" lang="plaintext">  } else {</span>
<span id="LC34" class="line" lang="plaintext">    printf("Failed to open /dev\n");</span>
<span id="LC35" class="line" lang="plaintext">  }</span>
<span id="LC36" class="line" lang="plaintext"></span>
<span id="LC37" class="line" lang="plaintext">  /* Open UART (console) */</span>
<span id="LC38" class="line" lang="plaintext">  int fd = open("/dev/console", O_RDWR);</span>
<span id="LC39" class="line" lang="plaintext">  if (fd < 0) {</span>
<span id="LC40" class="line" lang="plaintext">    printf("UART open failed\n");</span>
<span id="LC41" class="line" lang="plaintext">    rtems_test_exit(0);</span>
<span id="LC42" class="line" lang="plaintext">  }</span>
<span id="LC43" class="line" lang="plaintext"></span>
<span id="LC44" class="line" lang="plaintext">  printf("UART open successful\n");</span>
<span id="LC45" class="line" lang="plaintext"></span>
<span id="LC46" class="line" lang="plaintext">  /* Get current settings */</span>
<span id="LC47" class="line" lang="plaintext">  struct termios t;</span>
<span id="LC48" class="line" lang="plaintext">  if (tcgetattr(fd, &t) != 0) {</span>
<span id="LC49" class="line" lang="plaintext">    printf("tcgetattr failed\n");</span>
<span id="LC50" class="line" lang="plaintext">    close(fd);</span>
<span id="LC51" class="line" lang="plaintext">    rtems_test_exit(0);</span>
<span id="LC52" class="line" lang="plaintext">  }</span>
<span id="LC53" class="line" lang="plaintext"></span>
<span id="LC54" class="line" lang="plaintext">  /* Set ODD parity */</span>
<span id="LC55" class="line" lang="plaintext">  t.c_cflag &= ~(PARENB | PARODD);</span>
<span id="LC56" class="line" lang="plaintext">  t.c_cflag |= PARENB | PARODD;</span>
<span id="LC57" class="line" lang="plaintext"></span>
<span id="LC58" class="line" lang="plaintext">  if (tcsetattr(fd, TCSANOW, &t) != 0) {</span>
<span id="LC59" class="line" lang="plaintext">    printf("tcsetattr failed\n");</span>
<span id="LC60" class="line" lang="plaintext">    close(fd);</span>
<span id="LC61" class="line" lang="plaintext">    rtems_test_exit(0);</span>
<span id="LC62" class="line" lang="plaintext">  }</span>
<span id="LC63" class="line" lang="plaintext"></span>
<span id="LC64" class="line" lang="plaintext">  printf("Sending byte with parity enabled...\n");</span>
<span id="LC65" class="line" lang="plaintext"></span>
<span id="LC66" class="line" lang="plaintext">  /* Ensure TX buffer is flushed */</span>
<span id="LC67" class="line" lang="plaintext">  tcdrain(fd);</span>
<span id="LC68" class="line" lang="plaintext"></span>
<span id="LC69" class="line" lang="plaintext">  /* Send test byte */</span>
<span id="LC70" class="line" lang="plaintext">  write(fd, "A", 1);</span>
<span id="LC71" class="line" lang="plaintext"></span>
<span id="LC72" class="line" lang="plaintext">  close(fd);</span>
<span id="LC73" class="line" lang="plaintext"></span>
<span id="LC74" class="line" lang="plaintext">  TEST_END();</span>
<span id="LC75" class="line" lang="plaintext">  rtems_test_exit(0);</span>
<span id="LC76" class="line" lang="plaintext">}</span>
<span id="LC77" class="line" lang="plaintext"></span>
<span id="LC78" class="line" lang="plaintext">/* Configuration */</span>
<span id="LC79" class="line" lang="plaintext"></span>
<span id="LC80" class="line" lang="plaintext">#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER</span>
<span id="LC81" class="line" lang="plaintext">#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER</span>
<span id="LC82" class="line" lang="plaintext"></span>
<span id="LC83" class="line" lang="plaintext">#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK</span>
<span id="LC84" class="line" lang="plaintext">#define CONFIGURE_FILESYSTEM_DEVFS</span>
<span id="LC85" class="line" lang="plaintext"></span>
<span id="LC86" class="line" lang="plaintext">#define CONFIGURE_MAXIMUM_TASKS 1</span>
<span id="LC87" class="line" lang="plaintext">#define CONFIGURE_RTEMS_INIT_TASKS_TABLE</span>
<span id="LC88" class="line" lang="plaintext">#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT</span>
<span id="LC89" class="line" lang="plaintext">#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION</span>
<span id="LC90" class="line" lang="plaintext"></span>
<span id="LC91" class="line" lang="plaintext">#define CONFIGURE_INIT</span>
<span id="LC92" class="line" lang="plaintext">#include <rtems/confdefs.h></span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
</div>


</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #626168;">

<br>
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1212#note_148825">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.rtems.org">gitlab.rtems.org</a>. <a href="https://gitlab.rtems.org/-/sent_notifications/3-br5y7u3lt4bj48hfpr0xcunk2/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.rtems.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.rtems.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<span style="color: transparent; font-size: 0; display: none; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0;">
Notification message regarding https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1212#note_148825 at 1776745858
</span>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1212#note_148825"}}</script>


</p>
</div>
</body>
</html>