Okay, here's the relevant code for the test you're failing...I annotated with comments.
Code:
; Set VRAM addr to $2f00 + A
; Preserved: A, X, Y
set_vram_pos:
pha
lda #$2f
sta $2006
pla
sta $2006
rts
...
lda #6;) Palette read should also read VRAM into read buffer
sta result
lda #$12
jsr set_vram_pos ; sets VRAM address to $2f12
lda #$9a
sta $2007 ; stores $9a at $2f12, increments VRAM address to $2f13
lda $2007 ; returns VRAM read-buffered data, and reads from $2f13 (which will not contain $9a so you'd know if you read the wrong byte back or didn't do the buffering correctly)
lda #$3f ;
sta $2006 ;
lda #$12 ;
sta $2006 ; the above lines set VRAM address to $3f12
lda $2007 ; fills buffer with VRAM hidden by palette (in this case, $9a from $2f12, because $2000-$2fff are mirrored at $3000-$3fff)
lda #$13 ; change back to non-palette addr to enable buffer
jsr set_vram_pos ; set VRAM address to $2f13
lda $2007 ; read from VRAM, should return $9a which is in the buffer, perform a read from VRAM $2f13, and increment VRAM address
cmp #$9a
jsr error_if_ne ; if you didn't get $9a from that VRAM read you fail.