From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 4739B38983A3; Thu, 15 Dec 2022 19:59:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4739B38983A3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1671134364; bh=gSWPgqwXeyJVH1rvB1mBjZjIHyhfxeUQOQVRNYXCdHc=; h=From:To:Subject:Date:From; b=DekNEzJWDyTPgzqPsv2I/4rWCIs2LnZOMBLE3H3D6fsdWJ37OyYyOiX+2LnPcq/7n 2blSVMYhXj/rRS3iUxCIpf2h9q6vwBzZPQlEhCjDyEc3xEjWKZnEeySrUr9dnKnGRl Yas07m6QXrjCqb9ok0BxdIRoHw5gLTC11CBTbaiY= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] elf: Fix tst-relro-symbols.py argument passing X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/master X-Git-Oldrev: b712be52645282c706a5faa038242504feb06db5 X-Git-Newrev: 71e408e45dcacf429a94b2807f75aaadd8d37cb9 Message-Id: <20221215195924.4739B38983A3@sourceware.org> Date: Thu, 15 Dec 2022 19:59:24 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=71e408e45dcacf429a94b2807f75aaadd8d37cb9 commit 71e408e45dcacf429a94b2807f75aaadd8d37cb9 Author: Adhemerval Zanella Date: Wed Dec 14 18:18:34 2022 -0300 elf: Fix tst-relro-symbols.py argument passing Current scheme only consideres the first argument for both --required and --optional, where the idea is to append a new item. Checked on x86_64-linux-gnu. Reviewed-by: Florian Weimer Diff: --- elf/tst-relro-symbols.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/elf/tst-relro-symbols.py b/elf/tst-relro-symbols.py index 368ea3349f..ea61024b5e 100644 --- a/elf/tst-relro-symbols.py +++ b/elf/tst-relro-symbols.py @@ -56,10 +56,10 @@ def get_parser(): """Return an argument parser for this script.""" parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('object', help='path to object file to check') - parser.add_argument('--required', metavar='NAME', default=(), - help='required symbol names', nargs='*') - parser.add_argument('--optional', metavar='NAME', default=(), - help='required symbol names', nargs='*') + parser.add_argument('--required', metavar='NAME', action='append', + default=[], help='required symbol names') + parser.add_argument('--optional', metavar='NAME', action='append', + default=[], help='required symbol names') return parser def main(argv):