From: Tim Kientzle Date: Sun, 15 Jun 2008 19:49:20 +0000 (-0400) Subject: Separate out the BZip2-compressed ISO image into a separate X-Git-Tag: v2.6.0~167 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b8334c7a5574aa7fbb1a780ad789442fb475151a;p=thirdparty%2Flibarchive.git Separate out the BZip2-compressed ISO image into a separate file, to make it easier to update the image. While I'm here, fix the instructions in the C source for this test about how to regenerate the reference file from scratch. SVN-Revision: 125 --- diff --git a/libarchive/test/test_read_format_isorr_bz2.c b/libarchive/test/test_read_format_isorr_bz2.c index 107024f5e..9742bc99e 100644 --- a/libarchive/test/test_read_format_isorr_bz2.c +++ b/libarchive/test/test_read_format_isorr_bz2.c @@ -27,7 +27,7 @@ __FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_isorr_bz2.c,v 1.3 2 /* Execute the following to rebuild the data for this program: - tail -n +5 test-read_format-isorr_bz2.c | /bin/sh + tail -n +32 test_read_format_isorr_bz2.c | /bin/sh rm -rf /tmp/iso mkdir /tmp/iso @@ -37,68 +37,26 @@ ln /tmp/iso/file /tmp/iso/hardlink (cd /tmp/iso; ln -s file symlink) TZ=utc touch -afhm -t 197001010000.01 /tmp/iso /tmp/iso/file /tmp/iso/dir TZ=utc touch -afhm -t 196912312359.58 /tmp/iso/symlink -mkhybrid -R -uid 1 -gid 2 /tmp/iso | bzip2 > data.iso.bz2 -cat data.iso.bz2 | ./maketest.pl > data.c +mkhybrid -R -uid 1 -gid 2 /tmp/iso | bzip2 > test_read_format_isorr_bz2.iso.bz2 +F=test_read_format_isorr_bz2.iso.bz2 +uuencode $F $F > $F.uu exit 1 */ -static unsigned char archive[] = { -'B','Z','h','9','1','A','Y','&','S','Y','G',11,4,'c',0,0,199,255,221,255, -255,203,252,221,'c',251,248,'?',255,223,224,167,255,222,'&','!',234,'$',0, -'0',1,' ',0,'D',2,129,8,192,3,14,'2','3','$',19,184,'J',' ','F',168,244,201, -149,'6','Q',226,155,'S',212,209,160,'h','4','i',160,26,13,0,244,134,212,0, -218,'O',212,153,1,144,244,128,148,' ',147,13,' ',213,'=','1','\'',169,166, -128,'=','!',233,0,208,0,26,0,0,30,160,'h',0,'4','z',130,180,163,'@',0,0,4, -211,0,0,0,2,'b','`',0,0,0,0,0,8,146,133,'F',154,'y','A',163,'A',161,163,'@', -'z',134,'C','C','F',131,'F','@',0,0,0,0,6,154,26,'Q',24,234,180,'P',172,251, -'=',2,'P','H','&','Y','o',130,28,'"',229,210,247,227,248,200,'?','6',161, -'?',170,'H',172,'"','H','I',16,'2','"','&',148,'G',133,'T','z',224,1,215, -' ',0,191,184,10,160,24,248,180,183,244,156,'K',202,133,208,'U',5,'6','C', -26,144,'H',168,'H','H','(','"',151,'@','m',223,'(','P',169,'e',145,148,'6', -237,235,7,227,204,']','k','{',241,187,227,244,251,':','a','L',138,'#','R', -'"',221,'_',239,')',140,'*','*',172,'Q',16,1,16,207,166,251,233,'Z',169,'4', -'_',195,'a',14,18,231,'}',14,139,137,'e',213,185,'T',194,'D','`',25,'$',187, -208,'%','c',162,'~',181,'@',204,'2',238,'P',161,213,127,'I',169,3,' ','o', -6,161,16,128,'F',214,'S','m',6,244,11,229,'Z','y','.',176,'q',' ',248,167, -204,26,193,'q',211,241,214,133,221,212,'I','`',28,244,'N','N','f','H','9', -'w',245,209,'*',20,26,208,'h','(',194,156,192,'l',';',192,'X','T',151,177, -209,'0',156,16,'=',20,'k',184,144,'z',26,'j',133,194,'9',227,'<','[','^', -17,'w','p',225,220,248,'>',205,'>','[',19,'5',155,17,175,28,28,168,175,'n', -'\'','c','w',27,222,204,'k','n','x','I',23,237,'c',145,11,184,'A','(',1,169, -'0',180,189,134,'\\','Y','x',187,'C',151,'d','k','y','-','L',218,138,'s', -'*','(',12,'h',242,'*',17,'E','L',202,146,138,'l','0',217,160,'9','.','S', -214,198,143,'3','&',237,'=','t','P',168,214,210,'`','p','J',181,'H',138,149, -'1','B',206,22,164,'[','O','A',172,134,224,179,219,166,184,'X',185,'W',154, -219,19,161,'Y',184,220,237,147,'9',191,237,'&','i','_',226,146,205,160,'@', -'b',182,';',3,'!',183,'J','t',161,160,178,173,'S',235,':','2',159,':',245, -'{','U',174,'P',142,'G','(',')',9,168,185,'A','U',231,193,'g',213,'e',12, -'X',223,22,249,')',152,237,'G',150,156,3,201,245,212,'2',218,209,177,196, -235,'_','~',137,24,31,196,232,'B',172,'w',159,24,'n',156,150,225,'1','y', -22,'#',138,193,227,232,169,170,166,179,1,11,182,'i',')',160,180,198,175,128, -249,167,5,194,142,183,'f',134,206,180,'&','E','!','[',31,195,':',192,'s', -232,187,'N',131,'Y',137,243,15,'y',12,'J',163,'-',242,'5',197,151,130,163, -240,220,'T',161,'L',159,141,159,152,'4',18,128,'.','^',250,168,200,163,'P', -231,'Y','w','F','U',186,'x',190,16,'0',228,22,'9','F','t',168,157,'i',190, -'+',246,141,142,18,' ','M',174,197,'O',165,'m',224,27,'b',150,'|','W','H', -196,'.','*','Q','$',225,'I','-',148,169,'F',7,197,'m','-',130,153,0,158,21, -'(',221,221,226,206,'g',13,159,163,'y',176,'~',158,'k','4','q','d','s',177, -'7',14,217,'1',173,206,228,'t',250,200,170,162,'d','2','Z','$','e',168,224, -223,129,174,229,165,187,252,203,'-',28,'`',207,183,'-','/',127,196,230,131, -'B',30,237,' ',8,26,194,'O',132,'L','K','\\',144,'L','c',1,10,176,192,'c', -0,244,2,168,3,0,'+',233,186,16,17,'P',17,129,252,'2',0,2,154,247,255,166, -'.',228,138,'p',161,' ',142,22,8,198}; - DEFINE_TEST(test_read_format_isorr_bz2) { + const char *refname = "test_read_format_isorr_bz2.iso.bz2"; struct archive_entry *ae; struct archive *a; const void *p; size_t size; off_t offset; + + extract_reference_file(refname); assert((a = archive_read_new()) != NULL); assert(0 == archive_read_support_compression_all(a)); assert(0 == archive_read_support_format_all(a)); - assert(0 == archive_read_open_memory(a, archive, sizeof(archive))); + assert(0 == archive_read_open_filename(a, refname, 10240)); /* First entry is '.' root directory. */ assert(0 == archive_read_next_header(a, &ae)); diff --git a/libarchive/test/test_read_format_isorr_bz2.iso.bz2.uu b/libarchive/test/test_read_format_isorr_bz2.iso.bz2.uu new file mode 100644 index 000000000..6f9bdc433 --- /dev/null +++ b/libarchive/test/test_read_format_isorr_bz2.iso.bz2.uu @@ -0,0 +1,22 @@ +begin 644 test_read_format_isorr_bz2.iso.bz2 +M0EIH.3%!629369D1H`-#)LB!ZCQ,B&@8@)4R:) +M3S32#5/$TFF@R#0>B8@``#0```-`,1H&TI$0`!H``````````````:`D4H$# +M0``#0&@``#0```T````",1CJ-5#(?9Z!&"02F9_)#0+%DT>#A9!^E0)_5(E8 +M-#8VT!*:$?;0KJ$#H8`:XP`2^&"`22KI4`GOPHYT!*0T`)`J9#(-H3`2;3:! +M(0*0TB.U!*"`443'!$=9"X]N52(X=M9%X>?K%,)JY:(3B'1.7CP50TVY("20 +M+]L(Y1/HA1%M-1QR$W&J?%Y/)I7:Z!T10%=-.$!.U\39T@,4PHR00%._@Y`$ +MH5`$="!@-14X*+`+8"2>0*)&.2/$%3,4UN7%-6;#0C;J$/1!10,8%,0C'F`H +MF))HVB#(`P9(<#>`@0;G[%"(ZEL+\N!Q$/0[:H6"2X,].7@US8;^=CYYT_LJ +MU&LQ1;N.#E17MW)GXW\O"S&N?-"*D_%EB0LS`,2F+.YA2C99+$KER#-D$FZ$ +MD;,*EZJ4PT$<0Z:,1,2I-BLHRFFHF9J8XQB5YM>Y!'(Z2A56YCW@H93R#J54 +M)K(N.R',<9Y@^/`3=JDK;6RH93?SN;NEQO^UF9+7,(ZET@,5LF09#?G36AU% +MC6B7VNDC+V;S7LRTA'(Y04A4FL3%&B^"R^5DS%DMBVR,K.NN(W@,4]M`T\K, +MM>4I9XJIF)M;J0KS;[1AGO=6`PU5:UI*PQ$+UNB)'(*^=5*2P"-NES83(%'<4K:27,0NQ)1HIG +M&,3')SIO$)I;)";4?(M=:L\0$L*%&_O^%:U1@&/=V;3.M?:W:XN'>*9M7;FR +M<7:[R*JB5B)U:33XY2(P/6=O'T9VCC3KW]*2B$,)=!H[5WHR-UT,%1*OO(XF +BQ+:8V'<+9&$F7