From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Stancek Date: Tue, 14 Feb 2017 08:36:11 -0500 (EST) Subject: [LTP] [PATCH 2/4] lib: Redirect to tst_brk_() early In-Reply-To: <20170214132244.GB27516@rei.lan> References: <20170214122639.442-1-chrubis@suse.cz> <20170214122639.442-2-chrubis@suse.cz> <1949501488.4310106.1487078284316.JavaMail.zimbra@redhat.com> <20170214132244.GB27516@rei.lan> Message-ID: <1037046513.4322797.1487079371186.JavaMail.zimbra@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it ----- Original Message ----- > From: "Cyril Hrubis" > To: "Jan Stancek" > Cc: ltp@lists.linux.it > Sent: Tuesday, 14 February, 2017 2:22:44 PM > Subject: Re: [LTP] [PATCH 2/4] lib: Redirect to tst_brk_() early > > Hi! > > > We also had to add a few returns to various places in the test library so > > > that > > > we exit corresponding function in a case that tst_brkm() actually > > > returned. > > > > > > Signed-off-by: Cyril Hrubis > > > > 1/4 and 2/4 look good to me, and match exactly what we discussed. > > Reply to 3/4 and 4/4 will follow shortly. > > > > Build on RHEL5.6 6.0 and 7.3 passes, but I noticed couple additional > > warnings: > > > > tst_test.c: In function ???print_result???: > > tst_test.c:175: warning: ???res??? may be used uninitialized in this > > function > > What about adding an abort() after the tst_brk() in the switch? Agreed, if this fails there's something very bad going on. > > > test08.c: In function ???worker???: > > test08.c:54: warning: control reaches end of non-void function > > That should be fixed easily with return NULL; at the end of the > function. > > > netstress.c: In function ???server_fn???: > > netstress.c:539: warning: control reaches end of non-void function > > Dummy return NULL should fix this one as well. > > > > These fixes should be part of 3/4 that removes the attribute noreturn > from the tst_brk_(). > > -- > Cyril Hrubis > chrubis@suse.cz >