Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9Wwy-0002Uk-AV for pgsql-committers@arkaria.postgresql.org; Sun, 15 Sep 2019 16:00:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i9Wwx-0004lR-5X for pgsql-committers@arkaria.postgresql.org; Sun, 15 Sep 2019 16:00:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9Www-0004lE-P5 for pgsql-committers@lists.postgresql.org; Sun, 15 Sep 2019 16:00:30 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9Wwt-00062b-K3 for pgsql-committers@lists.postgresql.org; Sun, 15 Sep 2019 16:00:30 +0000 Received: by mail-qk1-x743.google.com with SMTP id p10so15684411qkg.8 for ; Sun, 15 Sep 2019 09:00:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=o/Emms8u6I/Jiuj7tfR8snVwhfoa/hEbyu89+wzC6hw=; b=Za3xvO9AvYNtRo4LyJJYMV/O/jZoIM2tezXJBSmQWuwEBfsb6MJjvk5KGsDkdyiANN YV9Gua5Q2weGQ4/rQOJ6qoCpuTQWDbaceQFMinZJWh3sai6yHIeAwbkaiCFUa6A0vrR9 q/ImENUfltO66I2Wblv4n8uf87WgvvTgVqZhSijN2NFHvcxdJmymrG9r9MyCufdKNE2k Pw0brsbM17dV8IPgSwCAf5twiK53puVU9ixLb8+AbDGtI+encUyxTiHdIkXE2A4AHYbo DSgCKvDdEhrjVXWnoQ8Jf3rtR1HvGjW4i+JlK/4+e/GIUMxf+VhfALI3IGU7l0oXt5X0 T/bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=o/Emms8u6I/Jiuj7tfR8snVwhfoa/hEbyu89+wzC6hw=; b=RSOROs24orGvx2RgVoPBy/GOSyP/6VU6QZxZ6CnfgMVmvJGVc3F4j0V9sYg+3lB6yB fLscirno9hIUzS9M5qCQXIxX7J5r0SqaRQA9bH6ykZ6f/nxgPMCMyGxxSs+cBIcw3pRg nnEqQf6WnXRLyxLTekx0bQPDo27f5O5vvIjYC2F7hkFTsEO2yYBNxeDirHIed/0KD/JO Rj+QwnKTpCgY0MHuJ6nlP+kPw/JfI1mu/9b4AZ9rwsxrncdiNi65lfgeQF/9ZozlLMAE YhPhXdsfu93ExCJ5+wNB5tHONGbmfEl1mU7FhycGRh2aSnLPkeLrMyUP39+i4JPWjMIA GeOg== X-Gm-Message-State: APjAAAUgd2t0+t6DUiOXg3f04C8LCvclQQ+wjhFn1/dRGGMZqZf5XK/m QaZUa6NjT7bxUmsKEXNswvF6eZARQbhPXA== X-Google-Smtp-Source: APXvYqxj6zVg+T2l5s7fCUtBtyjLLwgY71Y+T6sgbN5o73rzVVhzFyHBszI4EZP2mTo5AXrrtlc1dg== X-Received: by 2002:a37:a696:: with SMTP id p144mr58715674qke.435.1568563224517; Sun, 15 Sep 2019 09:00:24 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([179.56.51.60]) by smtp.gmail.com with ESMTPSA id k46sm15226076qtc.96.2019.09.15.09.00.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Sep 2019 09:00:23 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 5B7C312076E; Sun, 15 Sep 2019 13:00:21 -0300 (-03) Date: Sun, 15 Sep 2019 13:00:21 -0300 From: Alvaro Herrera To: Noah Misch Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Test pg_atomic_fetch_add_ with variable addend and 16-bit edge c Message-ID: <20190915160021.GA24376@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Sep-14, Noah Misch wrote: > Test pg_atomic_fetch_add_ with variable addend and 16-bit edge cases. I don't understand this. if (pg_atomic_fetch_add_u32(&var, INT_MAX) != INT_MAX) elog(ERROR, "pg_atomic_add_fetch_u32() #3 wrong"); pg_atomic_fetch_add_u32(&var, 2); /* wrap to 0 */ if (pg_atomic_fetch_add_u32(&var, PG_INT16_MAX) != 0) elog(ERROR, "pg_atomic_fetch_add_u32() #3 wrong"); The existing one seems to be naming the wrong function in the error message, and if you fix that then you have two "#3 wrong" cases. Isn't this confusing? Am I just too sensitive? Is this pointless to fix? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services