public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] setdomainname: use strlen() to get length of string
Date: Wed, 24 Jul 2019 10:38:38 +0200	[thread overview]
Message-ID: <20190724083838.GA17437@dell5510> (raw)
In-Reply-To: <5D36E6F1.7090008@cn.fujitsu.com>

Hi Li,

> On 2019/07/23 18:28, Li Wang wrote:
> > The sizeof(new) is only to get the size of char *, and it's not corret to pass
> > it as 'len' in setdomainname(). Here replace by strlen() to get the correct number
> > of characters for string.
> Hi Li,

> As setdomainname(2) manpage mentions, name does not require a terminating
> null byte.
> It looks good to me. :-)

> Best Regards,
> Xiao Yang
> > On x86_64, we get this failures if the LTP compilied in 32bit.

> >    -----Error Log-----
> >    setdomainname.h:24: INFO: Testing libc setdomainname()
> >    setdomainname01.c:24: FAIL: getdomainname() returned wrong domainname: 'test'
> >    setdomainname.h:27: INFO: Testing __NR_setdomainname syscall
> >    setdomainname01.c:24: FAIL: getdomainname() returned wrong domainname: 'test'
> >    -------------------

Thanks for fixing it and sorry for introducing obvious error.
Merged into master.

Kind regards,
Petr

      reply	other threads:[~2019-07-24  8:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 10:28 [LTP] [PATCH] setdomainname: use strlen() to get length of string Li Wang
2019-07-23 10:52 ` Xiao Yang
2019-07-24  8:38   ` Petr Vorel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190724083838.GA17437@dell5510 \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox