Whamcloud - gitweb
LU-14093 tests: silence gcc10 error for badarea_io
authorJames Simmons <jsimmons@infradead.org>
Thu, 20 Jan 2022 01:18:20 +0000 (17:18 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 21 Jan 2022 23:24:47 +0000 (23:24 +0000)
With gcc10 badarea_io will fail to build with the following error.

badarea_io.c: In function 'main':
badarea_io.c:59:7: error: 'write' reading 2097152 bytes from a
                           region of size 4 [-Werror=stringop-overflow=]
   59 |  rc = write(fd, &fd, 2UL*1024*1024);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Talking to Oleg see stated this is the done this way on purpose.
So instead of 'fixing' the issue in this case we silence the gcc
warning.

Lustre-change: https://review.whamcloud.com/44670
Lustre-commit: 084546f7d01b0eec8dafae9bc50edc778c3886ca

Test-Parameters: trivial
Test-Parameters: env=ONLY=133f,133g testlist=sanity
Change-Id: Iee79c7988cc209fd099c23c38a8bd7df96015b05
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46218
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/Makefile.am

index f8e902a..e139027 100644 (file)
@@ -100,6 +100,7 @@ nobase_test_DATA = $(nobase_noinst_DATA)
 
 LIBLUSTREAPI = $(top_builddir)/lustre/utils/liblustreapi.la
 
+badarea_io_CFLAGS=-Wno-stringop-overflow
 mmap_sanity_LDADD = $(LIBLUSTREAPI) $(PTHREAD_LIBS)
 multiop_LDADD = $(LIBLUSTREAPI) $(PTHREAD_LIBS)
 llapi_layout_test_LDADD = $(LIBLUSTREAPI)